oPiZiL

oPiZiL

Member Since 8 years ago

Experience Points
3
follower
Lessons Completed
28
follow
Lessons Completed
575
stars
Best Reply Awards
104
repos

26 contributions in the last year

Pinned
⚡ Industrial Robotic Software for Simulation and Offline Programming
⚡ xenomai patched linux kernel deb
⚡ Read a Playstation 2 Gamepad or Guitar Hero Controller using an Arduino
⚡ CAD files for the OpenHand hand designs
⚡ ROS software for controlling 7-DOF low-cost robotic manipulator
Activity
Dec
3
3 days ago
started
started time in 2 days ago
started
started time in 2 days ago
Activity icon
issue

oPiZiL issue comment odygrd/quill

oPiZiL
oPiZiL

RotatingFileHandler::_rotate doesn't handle rotation if file is opened in append mode

I am using RotatingFileHandler with append mode (a). This causes the rotation to stop working. Exceptions are:

failed to close previous log file during rotation, with error message errno: "17"
fwrite failed with error message errno: "9"

quill::Handler *file_handler = quill::rotating_file_handler(logDirFile, "a", maxFileSize, backupCount);

Problem seems to be that the rotate() function doesn't initialize the _currentIndex variable when booting up. This causes rotation always trying to rename function to logfile.1.log which already exists and rename operation fails.

See the code from rotate function and the comment // then we will always rename the base filename to 1

// if we have more than 2 files we need to start renaming recursively
  for (uint32_t i = _current_index; i >= 1; --i)
  {
    filename_t const previous_file = detail::file_utilities::append_index_to_filename(_filename, i);
    filename_t const new_file = detail::file_utilities::append_index_to_filename(_filename, i + 1);

    quill::detail::rename(previous_file, new_file);
  }

  // then we will always rename the base filename to 1
  filename_t const previous_file = _filename;
  filename_t const new_file = detail::file_utilities::append_index_to_filename(_filename, 1);

  quill::detail::rename(previous_file, new_file);

If we open the file in 'w' mode the previous file gets overwritten and log writing is started ok.

Is this by design or can this be corrected?

oPiZiL
oPiZiL

failed to rename previous log file during rotation, with error message errno: "2"

started
started time in 2 days ago
Dec
1
5 days ago
started
started time in 4 days ago
Nov
27
1 week ago
Nov
25
1 week ago
Activity icon
issue

oPiZiL issue odygrd/quill

oPiZiL
oPiZiL

How to log a raw string without fmt/__FILE_NAME__ etc.

Just print as it

started
started time in 1 week ago
started
started time in 1 week ago
Nov
24
1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
Nov
23
1 week ago
Nov
21
2 weeks ago
Activity icon
issue

oPiZiL issue odygrd/quill

oPiZiL
oPiZiL

single file with different patterns

Nov
20
2 weeks ago
Activity icon
issue

oPiZiL issue odygrd/quill

oPiZiL
oPiZiL

How to log a raw string without fmt/__FILE_NAME__ etc.

Just print as it

Nov
16
2 weeks ago
started
started time in 2 weeks ago
started
started time in 2 weeks ago
started
started time in 2 weeks ago
Nov
14
3 weeks ago
started
started time in 3 weeks ago
Nov
9
3 weeks ago
started
started time in 3 weeks ago
Nov
6
1 month ago
push

oPiZiL push oPiZiL/CTK

oPiZiL
oPiZiL

ENH: Install all header for ctkMacroBuildLib

commit sha: c328213e028e5b5881e94f16df013514b51fb475

push time in 4 weeks ago
pull request

oPiZiL pull request oPiZiL/CTK

oPiZiL
oPiZiL

ENH: Install all header for ctkMacroBuildLib

pull request

oPiZiL pull request oPiZiL/CTK

oPiZiL
oPiZiL

ENH: Install all header for ctkMacroBuildLib

push

oPiZiL push oPiZiL/CTK

oPiZiL
oPiZiL

ENH: Install all header for ctkMacroBuildLib

commit sha: 1f243c00b5ad5fc27af040d6e423dd35727feb3f

push time in 4 weeks ago
push

oPiZiL push oPiZiL/CTK

oPiZiL
oPiZiL

BUILD: Install all header for ctkMacroBuildLib

commit sha: 3980f9528c12c5af450810d8b36aeb162a23d40d

push time in 4 weeks ago
pull request

oPiZiL pull request commontk/CTK

oPiZiL
oPiZiL

Set default qt version to qt5

pull request

oPiZiL pull request commontk/CTK

oPiZiL
oPiZiL

Install all header for ctkMacroBuildLib

  • default qt version set to qt5
  • install all headers with ctkMacroBuildLib and maintain the directory heirarchy
Activity icon
created branch

oPiZiL in oPiZiL/CTK create branch build-install-all-headers

createdAt 4 weeks ago
pull request

oPiZiL pull request commontk/CTK

oPiZiL
oPiZiL

Set default qt version to qt5

Previous