If you need like me, a logger for your deamons and services… just look at this simple logger:
void Init(std::wstring name);
void WriteLog(std::wstring message);
You put the name of the file in Init() method as then, you just call WriteLog() ! Let’s ook at the code impl:
void CLogger::Init(std::wstring name)
_name = name;
_stprintf_s(szPath, _T("%s\\%s"), szTemp, name.c_str());
_path = szPath;
void CLogger::WriteLog(std::wstring message)
std::string path(_path.begin(), _path.end());
memset(&st, 0, sizeof(SYSTEMTIME));
_T("%02d:%02d:%02d.%03d - INFO - %s\r\n"),
st.wHour, st.wMinute, st.wSecond, st.wMilliseconds,
std::wstring wsz = sz;
std::string msgToWrite(wsz.begin(), wsz.end());
HANDLE hFile = ::CreateFileA(path.c_str(),
LONG l = 0;
::SetFilePointer(hFile, 0, &l, FILE_END);
DWORD dwLen = 0;
I recently have done a 2 days event in MS Office about programming MXCHIP and Azure IoT stuff. It’s amazing what that kind of little hardware can achieve. For now, I have to make a demo for my managers.
The code and compilers are included into VSCode extensions and SDK Kit.
Everything is simple in the demo mode. But in real, you spend a lot of time… :)
The open-source community are not very happy. In my opinion, it’s the same thing that when Oracle buy Java and MySQL… You think of something just foolish. The problem is that Microsoft tell us that the company has changed and they do Open-Source.
First, we don’t have all the same definitions of what is Open-Source development. Microsoft vision is not Richard Stallman vision.
Some people tell us that a lot of companies/people will leave Github. True or False ?
Let’s take time to see and we will comment in 6 months.
Monday 25 June 2018, I will be a speaker for a Programmez magazine event.
I will code C live ! It will be about coding LMDB for Windows as a DLL and testing a client that can make 1.000.000 rows in 1 second. Can you say that ?
Source code from https://github.com/LMDB/lmdb. To make a DLL, it’s just some syntax errors compilation in MSVC 17. But if builds after minor corrections.
This week has been a busy week. I have changed from an appartment to another from Nogent sur Marne to Fontenay sous Bois. Putting all the little things in bags… It’s done. I am tired.
Look my desktop, it’s cool:
I am proud to announce that the .NET Rangers community is back ! We have 3 MVP !
We have a blog : http://www.dotnetrangers.org and a Twitter account:
.NET Rangers @RangersNet
Members of the community:
- Jean-Baptiste B. Sogeti
- Cdric G. Sogeti
- Jean-Nicolas B. Sogeti
- Guilhem M. C-S
- Cdric T. Sogeti
- Keelan C. Sogeti
- Eva D. Neos-SDI
- Frederic S. Sydev
- Michel F. Indep
- Jean-Nol G. Indep
- Christophe P. Neos-SDI