Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify logging in new XML format #1575

Closed
mstormi opened this issue Sep 1, 2021 · 2 comments · Fixed by openhab/openhab-distro#1312
Closed

Specify logging in new XML format #1575

mstormi opened this issue Sep 1, 2021 · 2 comments · Fixed by openhab/openhab-distro#1312

Comments

@mstormi
Copy link
Contributor

mstormi commented Sep 1, 2021

Once more I had logging fill the (SD) disk and came to think if we should limit that better in openHABian.
(EDIT: or change OH's default ?)

We should limit the size and number of logs, and unlike OH default config, we should gzip them.
Attention: we must NOT use any external tool such as logrotate for OH logs! log4j2 handles this.

Unfortunately, the config format to spec what's logged and how it's treated - specified in /var/lib/openhab/etc/log4j2.xml - has changed to xml and all the information I have (for now) is in the old format.
http://karaf.apache.org/manual/latest/#_log4j_v2_support
openhab/openhab-docs#1163

For reference, stuff to change in old format:

log4j2.appender.event.strategy.type = DefaultRolloverStrategy
log4j2.appender.event.strategy.max = 7

log4j2.appender.event.strategy.fileIndex = min
(not sure if that last is required)

log4j2.appender.out.filePattern = ${openhab.logdir}/openhab.log.%i.gz
(to have it gzip logfiles)

@mstormi mstormi changed the title Logging Specify logging in new XML format Sep 1, 2021
@ecdye
Copy link
Contributor

ecdye commented Sep 1, 2021

I don't see any problem with this. It may even help solve a problem which is kind of nice too.

@mstormi
Copy link
Contributor Author

mstormi commented Sep 3, 2021

Fixed-By: openhab/openhab-distro#1312

@mstormi mstormi closed this as completed Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants