Hi Alan,

Thanks for your email.

I had a closer look and I think I do not think of a bug anymore.

Filesize is only checked once, while initializing the syslog file channel
with syslog_file_channel() at board level. In other words, rotation does
only happen on reboot.

A "life-rotate" mechanism would need to monitor log file size and do the
following:

sched_lock();
syslog_dev_uninitialize();
log_rotate();
syslog_dev_initialize();
syslog_channel();
sched_unlock();

This mechanism could live in a separate task
in drivers/syslog/syslog_filechannel.c or even at board level.
Or it could be triggered by each call of syslog() being addressed in the
depth of syslog.

As a first measure I reduced the log output of my application. It is
arguable if this "life-rotate" feature is of any real good in case you do
not have 1Gb log files by mistake.

Do you have any thoughts about this?

Simon

--
Ingenieurbüro-Filgis
USt-IdNr.: DE305343278
--
sent by mobile phone

Alan C. Assis <acas...@gmail.com> schrieb am So., 1. Jan. 2023, 14:01:

> Hi Simon,
>
> Happy new year!
>
> Do you know if that Rotating Log was working on previous releases (i.e
> 10.3) ?
>
> Probably some recent modification broke it.
>
> I think we don't have a Rotation Log test, we need some Software
> Qualification Testing when doing a software release.
>
> I just opened an Issue about it:
> https://github.com/apache/nuttx/issues/8017
>
> BR,
>
> Alan
>
> On 1/1/23, Simon Filgis <si...@ingenieurbuero-filgis.de> wrote:
> > Dear nuttx developers,
> >
> > I find the syslog architecture to generated files way bigger then
> > configured:
> >
> > [image: image.png]
> >
> > 6 files of log-files with unpredictable final size, up to 1,5GB.
> >
> > [image: image.png]
> >
> > I would expect 10 files with maximum 0.5MB.
> >
> > The file log stream is delegated to sd-card.
> >
> > Does anybody face the same issue?
> >
> >
> > Happy new year,
> >
> > Simon
> >
> >
> >
> >
> > --
> > Ingenieurbüro-Filgis
> > USt-IdNr.: DE305343278
> > --
> > sent by mobile phone
> >
>

Reply via email to