node-export-server icon indicating copy to clipboard operation
node-export-server copied to clipboard

Log with lower severity when resources.json is not found

Open paukert opened this issue 8 months ago • 2 comments

Export server version: v5.0.0 Highcharts version: 10.2.1

Configuration:

  • CUSTOM_LOGIC_ALLOW_CODE_EXECUTION = true (code execution is allowed to support passing JS functions to formatters)
  • --enableServer 1 (as was already mentioned in https://github.com/highcharts/node-export-server/issues/451#issuecomment-2008524099, setting env variable SERVER_ENABLE does not work and it has to be passed as parameter in ENTRYPOINT)

Current behaviour: When code execution is allowed, the server assumes that there should be resources.json file and if there is none, it issues a warning.

Expected behaviour: Server does not log message with warning severity.

Export server logs:

2025-04-05 14:52:14 Sat Apr 05 2025 12:52:14 GMT+0000 [warning] - [chart] Unable to load the default resources.json file.

paukert avatar Apr 05 '25 13:04 paukert

@paukert, if you need a quick fix for this problem (so that the server runs), I've made a few changes here: https://github.com/highcharts/node-export-server/commit/d029d00144af238c7f28cb50f5a52d7079273ae1

baroso avatar Apr 14 '25 15:04 baroso

@baroso, thanks, the server works even if the resources.json file is not found, but it is a little bit annoying to get warning message with every exported chart (without patch applied)

paukert avatar Apr 16 '25 21:04 paukert