etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

Log4js is stale due to upstream change

Open JohnMcLear opened this issue 12 years ago • 8 comments

Log4js is stale

JohnMcLear avatar Oct 06 '13 21:10 JohnMcLear

cc @nomiddlename

marcelklehr avatar Oct 07 '13 16:10 marcelklehr

Mheh it turns out log4js made loads of breaking changes over the years and now I gotta support old settings/configs to pass to their now broken API. FML

JohnMcLear avatar Mar 30 '20 15:03 JohnMcLear

  • [ ] Write mechanism to see if this is pre v2 config (appenders.out !== 'undefined')
  • [ ] Write mechanism to see if this is pre v2 install of log4js (version)
  • [ ] Write mechanism to port v1 config to v2.
  • [ ] Update settings.json.template with new config style
  • [ ] Make changes to logic handlers IE reload of config [ a8ec242d0047e501b410d44108d7a70a1d7cb705 ]

JohnMcLear avatar Mar 30 '20 15:03 JohnMcLear

I'm not gonna work on this, just don't feel like it :)

JohnMcLear avatar May 14 '20 21:05 JohnMcLear

I'm not gonna work on this, just don't feel like it :)

I'd be surprised if anyone feels like working on this. :smile:

Unless there is an existing library that can convert a v0.6.35 config to something compatible with v2.0 and later, I think the only feasible option is to break backward compatibility and force users to re-write their logging settings. (Also: log4js seems to have gone out of favor, so we may want to switch to winston or something else.)

To make it possible for us to change the logging library again in the future without breaking user configs, I suggest we simplify the logging settings by replacing them with the following:

  • settings.loglevel: Unchanged.
  • settings.logfile: If set, also write log messages to this file. Defaults to unset.

And if we switch to a logging library that supports syslog, add the following

  • settings.syslog: If true, also write log messages to syslog (LOG_USER facility). Defaults to false.

Most users aren't going to want anything more sophisticated than the above. For exotic configurations, we can either tell users to patch their local copy of Etherpad or we can have a (hidden?) advancedLoggingConfig object in settings.json that is not guaranteed to remain compatible across Etherpad versions.

rhansen avatar Oct 05 '20 17:10 rhansen

This is a configuration breaking change to bump log4js we have in our deployed version running at zumpad.zum.de. Even with subsequent merges of upstream into our codebase we did not experience much changes necessary. The bump so far only affected configuration and usage of console.* (needed some additional initialization).

https://github.com/ZUMTeam/etherpad-lite/tree/log4js-upgrade

squiddle avatar Oct 09 '21 07:10 squiddle

This is a configuration breaking change

I don't understand what you mean by "this".

Note that PR #5178 deprecated the logconfig setting, which will make it possible for us to upgrade log4js once users have been given enough time to remove logconfig from their settings.json.

rhansen avatar Oct 15 '21 07:10 rhansen

This is a configuration breaking change

I don't understand what you mean by "this".

The "this" is referencing my linked branch where i did a log4js upgrade even before the existing logconfig setting got deprecated. I posted it for anyone who also needed to upgrade until etherpad has an official way to move forward (which it now has).

squiddle avatar Jan 24 '22 07:01 squiddle

i think this issue can now be closed. With v1.9.4 log4js was bumped a few major versions. https://github.com/ether/etherpad-lite/releases/tag/v1.9.4

squiddle avatar Feb 04 '24 12:02 squiddle

True

SamTV12345 avatar Feb 04 '24 16:02 SamTV12345