SergiusTheBest / plog

Portable, simple and extensible C++ logging library
MIT License
2.21k stars 391 forks source link

Plog not initializing with too long of a file name? #279

Closed Icyfiremario closed 8 months ago

Icyfiremario commented 8 months ago

I am trying to use the date and time for the log file name but for some reason, the logger doesn't initialize or cut off the file extension and won't write to the file.

Here is a screenshot of my code. I am using C++17 with Vulkan. image

Here is the final string from the debugger image

SergiusTheBest commented 8 months ago

@Icyfiremario Oh, on Windows a file path can't contain :, so .\logs\02_09_2024_10:19:18.log is invalid. Replace : with _ and you'll be fine.

Icyfiremario commented 8 months ago

@Icyfiremario Oh, on Windows a file path can't contain :, so .\logs\02_09_2024_10:19:18.log is invalid. Replace : with _ and you'll be fine.

Oh, I did not know that, Thanks!

SergiusTheBest commented 8 months ago

@Icyfiremario No problem. Happy hacking!