0xmalloc / c-log Goto Github PK
View Code? Open in Web Editor NEWa fast ,stable and thread-safe log lib(logger) for C/C++ language
License: Apache License 2.0
a fast ,stable and thread-safe log lib(logger) for C/C++ language
License: Apache License 2.0
I have a project written in C, while trying to compile the project mixed with c-log, I got this error:
unknown type name "class"
大神,你好。
多次init有什么特殊作用吗?一个线程中init,其它线程都可以用了?似乎没有对log文件大小进行限制啊?
bug:
在linux 创建的目录不可写,导致init时的路径有目录就失败。
c文件中25行左右:
原文:if (mkdir (p_logdir, S_IREAD | S_IWRITE ) < 0)
改为:S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH
就可以了。
写的不错 不过不是多线程
这个c-log好像只能在linux环境下运行吧,有没有适用于windows的版本呢?
谢谢!
在mac 下,__thread 无法使用。 可能是mac 对 C++ 11支持不好
Can it be used in windows platform ?
我用QT 编译成功,
不过有些问题。
Hello,有两个问题想请教一下
if(0 != access(m_filelocation, W_OK))
{
pthread_mutex_lock(&m_mutex);
//锁内校验 access 看是否在等待锁过程中被其他线程loginit了 避免多线程多次close 和init
if(0 != access(m_filelocation, W_OK))
{
logclose();
loginit(m_system_level, m_filelocation, m_isappend, m_issync);
}
pthread_mutex_unlock(&m_mutex);
}
线程中执行access(m_filelocaltion,W_OK)什么时候会失败呢?貌似主线程已经做了loginit,说明对该文件时有写的权限的,后面执行为什么会失败呢?
如有问的不合理之处,还请见谅,谢谢~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.