what determines emitter color

Notes, tips, and other usefull things on how to use LogMX

Moderator: admin

Post Reply
jpierce
Posts: 51
Joined: Thu Mar 21, 2019 3:51 pm

what determines emitter color

Post by jpierce »

What determines what color the emitter will be colored (on the left side under Emitters)?

I had thought it was the highest log level of any line that used that emitter (or a child of that emitter). But that doesn't seem to be the case.
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: what determines emitter color

Post by admin »

Hello,

Your initial thought was correct, but this computation is recursive: if only the Emitter A.B.C contains errors, then A, B, and C will all be red. But I feel like you thought about that too ("or a child of that emitter"), so if you found something that looks wrong, please post a screenshot here.

Xavier
jpierce
Posts: 51
Joined: Thu Mar 21, 2019 3:51 pm

Re: what determines emitter color

Post by jpierce »

I experimented a bit more and think I get it now. For

For example:
Image

For emitter A
1. If a log line with an emitter of exactly A or any descendant of A has a Group 5-6 log level, color A them with the respective color (yellow or red) for those levels.
2. If a log line with an emitter of exactly A has a Group 1-4 log level, color only A with that color (green).
3. If there are no log lines with an emitter of exactly A (only descendants), color A with the "no lines for this emitter" color (gray).

Does that seem right?

I think one of the difficulties I have is that I wanted the Group 1 log lines to have a different color. I changed TRACE to gray. So this got really confusing because the red/yellow/green/gray coloring for emitter nodes is fixed and isn't based on any of the colors you set in the options.

This is turning into a bit of a feature request: allow the "rollup" colors of the emitter nodes to be configured as well.

I would say you'd just click the Group you want and click the edit pencil under the Levels tab, but that only really works for Group 5 and 6. Since 1-4 all get lumped together it doesn't make sense. Plus you'd probably want to specify the color for emitters that had no log lines of their own (case #3 up there).
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: what determines emitter color

Post by admin »

Yes, your description of how the colors are determined is correct. Nailed it :D (in my last message I forgot to explain the gray color!)

Concerning a new option for this emitters tree, I'm not sure to understand why you would want to use other colors?
  • To match your level colors maybe? In this case, it could be risky to use a background color, which can be really bright, for a font color with a white background (i.e. you won't be able to read the emitters names)
  • To disable this Christmas tree style colors, and use only black instead? In this case it might be more effective to just have a "Yes/No" option like "Use colors in Emitters tree"
  • Or maybe by "rollup" you meant only when a parent emitter inherits its color from its children? So the color you would pick in the Options would be the one to use for the parents, but not for the children?
jpierce
Posts: 51
Joined: Thu Mar 21, 2019 3:51 pm

Re: what determines emitter color

Post by jpierce »

I'm simply talking about a way to set the foreground colors you are currently using in the emitter tree. Right now, it's hardcoded to red, yellow, green and gray.

Ideally, though, I'd like there to be at least one more coloring level. I say that because I color TRACE lines with gray (mainly to match the border - I might switch to white or just barely light gray when you add the borderless support). If an emitter level contains only TRACE lines, I don't really care about it much. I'm more interested in the ones that contain INFO lines, which I'm coloring green, WARN (yellow) and ERROR (light red)/FATAL (bright red).

I've typed up several different suggested ways you could change it, but I they all subvert the logic you're currently using for anything other than the red and yellow levels. I'm not sure how I can suggest doing it so that "green stuff I'm interested in bubbles up" in the same way the red/yellow stuff does, while also keeping the paradigm of Rule #3 above.
Post Reply