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

Log into Nebula Logger #18

Open
fentes opened this issue Dec 16, 2022 · 5 comments
Open

Log into Nebula Logger #18

fentes opened this issue Dec 16, 2022 · 5 comments

Comments

@fentes
Copy link

fentes commented Dec 16, 2022

Hey Dennis,

awesome tool from an awesome guy 😉

we have several batch jobs scheduled which is working fine. But for logging, we are using Nebula Logger since the tool is more sophisticated for logging. Is it possible to combine both? The batch job logs can show whether the job was successfull, but Nebula allows us to log business logic related issues, but there we don't see whether the job was successful. It would be great to allow users to select the logging system.

Process could look like:

  1. Batch Orchestrator starts with a job.
  2. In the code of the job, we are using Logger.info to log stuff
  3. Job was successful, so Orchestrator marks the log as successful (or at least, not as an error)
  4. Both information (Status of job + business logic) is stored in one log

If business logic calls Logger.error(), the job/log should be marked as failed.

@dschibster
Copy link
Owner

dschibster commented Dec 16, 2022

Hey there Steffen and thanks for the suggestion.
I really love Nebula Logger myself and would love to get it working with the Orchestrator, but first I'll need to come up with a few different concepts:

  • How to plug Nebula Logger into the logging Engine I currently use (solution would be to make this an interface, but getting it to work that way will be a different challenge)
  • Reacting to Error Logs (For that I wager the Plugin Framework will serve pretty well)
  • Making sure they actually come up in the Batch Orchestrator App. I was thinking of creating Scenarios for the respective Batch Job Schedule, but that still leaves the Batch Job itself unassociated.

I'll give this a thought or two and come back to you! Also I'll probably ask if we can dig into the LogEntryBuilder or the Top-Level Metadata somehow to add association with Custom Fields. :)

Thanks for the positive feedback. Appreciate it when the tool provides value. :)

@dschibster
Copy link
Owner

Generally though @fentes I would still stipulate the use of the same methods as currently, but having logs be created by nebulaLogger in the background. This ensures that you don't actually have to refactor everything should you decide to switch Logging solutions in the middle of usage.

@fentes
Copy link
Author

fentes commented Dec 16, 2022

Hey general, my main concern is, we need to proactively look into the batch jobs to see whether something was crashing. For Nebula we need to do it as well, but I like to have one single place. Jongpie is already thinking about adding the possibility to send emails for error logs. Having both systems combined could make use of that as well.
Replacing the Batch Job Logs completely might not be a must have. But if it would be possible to get rid of them, we could make use of the LogPurger + RetentionRules, to clean up the system.

@dschibster
Copy link
Owner

Purging is something I would like to create for Batch Job Logs specifically too. :) But for the time being I agree with you that having one unified Logging Solution would be awesome. I would say creating double Logs is not really clean, nor is it needed. The idea I have is to be able to see Logs that reflect what BJLs currently do, in the same place as Batch Job Logs currently reside. I don't want Nebula Logger integration to be a compromise but rather a combination of the best of these two worlds.

@dschibster
Copy link
Owner

@fentes For those people that don't feel like putting everything into Nebula Logger I'll create an issue for notifying about Jobs with failed Batches.

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

No branches or pull requests

2 participants