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

[IMP] netsvc: add remote_logging capability #26965

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ap-wtioit
Copy link
Contributor

Description of the issue/feature this PR addresses:
enable RFC5424 compliant remote logging in odoo

Current behavior before PR:
Odoo is only able to log to the file system with the --syslog option

Desired behavior after PR is merged:
Odoo is directly capeable to transmit logfiles to an RFC5424 compliant log server (e.g. Graylog2), which enables to transmit more information to the server (like line number and file)

Info @wt-io-it

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@ap-wtioit
Copy link
Contributor Author

ap-wtioit commented Sep 13, 2018

CLA check should have been successful, commit was made with wrong email

@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Sep 13, 2018
@wtaferner
Copy link
Contributor

@odony @mart-e
Any chance to get this in 12.0?
Worth a lot IMHO and "just" an option...maybe you can do a short review to get some feedback.

@Elkasitu
Copy link
Contributor

Hi,

It's a good idea and definitely worth looking at, however I doubt it can be merged for 12.0, for various reasons, one of them being that we decided not to add any more CLI options until its refactoring takes place (unless strictly necessary), which is not a priority for v12 and currently has no ETA

@odony
Copy link
Contributor

odony commented Sep 14, 2018

Sorry, what's wrong with using the log shipping facilities of syslog? That's what we're doing whenever we need to send log remotely. If you need remote logging, chances are you won't just be shipping the logs of just one application, but other processes and system logs as well. Hence centralizing through syslog makes sense. Why would you want to reconfigure it in each application, including Odoo?

odoo/netsvc.py Outdated Show resolved Hide resolved
@odony
Copy link
Contributor

odony commented Sep 14, 2018

Structured logging does not seem worth extra custom code in standard. Have you tried providing this facility has a separate module? A PR that makes pluggable logging facilities could be more easily accepted.
Odoo is huge enough to maintain, we tend to avoid including code that we don't plan to actively use ;-)

@wtaferner
Copy link
Contributor

@odony
Thank you for your appreciated opinion and feedback.
Nothing is wrong using syslog itself, but having structured output without the need of parsing syslog was the reason why we directly send the logs remote.

As I am super happy ^^ and excited about the centralized, indexed and custom structured log facility I thought it is worth proposing and open it for discussion. Of course doing a plug-able module would make it sexier, but as @Elkasitu said, we probably wait here for the time when this part of code becomes priority for you guys too.

Not sure if there is really a lot to maintain here, but as always you have an argument and maybe we might have a little talk about it in person in a few weeks to understand each PoV a bit better ;-)

This enables odoo to log directly to RFC 5424 (Syslog) log server
 (e.g. Graylog2).
This has the benefit over the syslog option that we make all python
available attributes of the message directly available in the log
server.
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Sep 17, 2018
@Elkasitu Elkasitu added Wishlist Framework General frontend/backend framework issues labels Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses Framework General frontend/backend framework issues Wishlist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants