Logging into JSON format

How to setup Janus to log to JSON.

I read everything in the documentation and use it what I found, but it doesn’t work. I tried use it in a docker container.

I installed all of the proposed package and set all of the must in the make configuration. But the plugin did not installed. And if I see correctly the config for the logger also did not loaded.

Can you share a concrete solution with me?

There’s a JSON logger plugin: janus_jsonlog.c File Reference
You need to pass --enable-json-logger when configuring Janus to build it. You’ll also need to tweak its configuration file to enable it and tell it where to save the file.

Hi Lorenzo,

thank you for your help…

Ohhhh… It’s working with this option…

I found --enable-json and --enable-logger-plugin, but not this.

There is one more question:
Can I turn off the plain text logging because now logging is done in both files.

Thank you!

Yes, passing -N (--disable-stdout) on the command line, or setting log_to_stdout = false in janus.jcfg.

And one more…
There is a doc where I can read about these topics?

The general documentation is available here: Janus - General purpose WebRTC server
You can find out the command line options by passing -h when launching Janus. All properties available in configuration files are documented in the configuration files themselves.

I couldn’t find what you’re referring to in your first answer (the solution: --enable-json-logger). I’ve read all the pages dealing with loggers.

–help is a very useful command.

Thanks for the help, all my problems have been solved.

./configure --help