Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Log color output



  • Just curious if there is a way to style the log contents when using Log-Information or Log-Error. I'd like the Log-Error entries to show up in red.


  • inedo-engineer

    Hi @cjchambers_1799 ,

    Log entries are stored with an associated log level (error, warning, info, debug), and when you Log-Error it writes that item to the log with an error level.

    When displaying log entries, error-level entries are displayed in Red, warning are in Yellow, and Debug is in Light-Grey.

    So, I think this already behaves the way you are asking.

    Cheers,
    Alana



  • I probably could have been clearer. This is the screen I was asking about:

    Capture.PNG

    I like to view the full log on the black background because it's easier to read in dark mode. If this can't be changed, no big deal. Just thought I'd ask.


  • inedo-engineer

    Hi @cjchambers_1799 ,

    I'm not entirely sure what screen that is.....I think the execution-in-progress page (with the moving bar)?

    So you're using the built-in Dark Mode then? Can you (temporarily) try switching to Light Mode, just to make sure it's showing up in the proper/expected colors?

    If that's the case, likely just a CSS bug/fix we need to make :)

    I didn't test yet, but just want to be sure I know we're looking at right thing.

    Cheers,
    Alana



  • To reach this screen (I'm creating my build, so doing build after build to test) - after a failed build, I hit "View Details"

    This page has the CSS working fine, but red on light gray doesn't work for my eyeballs. So I scroll down to bottom and hit "View Log Text"

    That gives me a url like this in a new window:
    http://172.16.9.194:81/executions/logs?executionId=514&level=0&download=False

    Now I just put in the newest execution id in the url and hit enter to see the next failed build error messages. Kind of a quicker way to see my newest failure instantly.

    I unchecked dark mode, the log text screen stays white on black. Cleared cache just to make sure.


  • inedo-engineer

    Hi @cjchambers_1799 ,

    Thanks for clarifying that; that handler outputs logs in plain text format (content-type is like txt/plain or something like that, not html).

    That url is intended mostly to download/export the log files for APIS and other tools, but we put it in the UI for discoverability. And sometimes it's convenient to CTRL-F everything.

    Since it's plain-text, it's not possible to do any kind of formatting (even a user-style sheet). But I guess you could CTRL-F [Error] or something, and it will "highlight" it in the browser at the least.

    Cheers,
    Alana



  • Ok, no prob! Thank you!


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation