Skip to content

Better logging #22

Closed
Closed

Description

@DavidGOrtega

Use a proper logging library

@0x2b3bfa0 moved the rest of items to a separate issue, as @casperdcl suggested in the past weekly meeting.

Click to see the original text...

nice to have

(put in separate issue)

  • wrap specific CI vendor capabilities
  • heartbeats (in openmetrics format?)
  • file configurable
  • integration with studio

Edit:
Coming back to this we should now, with the 0.3.0 release, attack this.
The proposal would be use winston and a configurable file. We can also collect runner heartbeat using openmetrics format

Activity

  1. changed the title [-]Better logging[/-] [+][cml-runner] - Better logging[/+] on Feb 23, 2021
  2. 0x2b3bfa0 commented on May 21, 2021

    @0x2b3bfa0
    Member

    cml/bin/cml-pr.js

    Lines 3 to 4 in c61fe70

    const print = console.log;
    console.log = console.error;

    🤯
    #define struct union
    #define if while
    #define else
    #define break
    #define if(x)
    #define double float
    #define volatile
    
    #define M_PI 3.2f
    #undef FLT_MIN
    #define FLT_MIN (-FLT_MAX)
    #define floor ceil
    #define isnan(x) false
    #define true ((__LINE__&15)!=15)
    #define true ((rand()&15)!=15)
    #define if(x) if ((x) && (rand() < RAND_MAX * 0.99))
    
    #define memcpy strncpy
    #define strcpy(a,b) memmove(a,b,strlen(b)+2)
    #define strcpy(a,b) (((a & 0xFF) == (b & 0xFF)) ? strcpy(a+1,b) : strcpy(a, b))
    #define memcpy(d,s,sz) do { for (int i=0;i<sz;i++) { ((char*)d)[i]=((char*)s)[i]; } ((char*)s)[ rand() % sz ] ^= 0xff; } while (0)
    #define sizeof(x) (sizeof(x)-1)
    
  3. DavidGOrtega commented on May 21, 2021

    @DavidGOrtega
    ContributorAuthor

    @0x2b3bfa0 I dont fully follow you 😁

  4. DavidGOrtega commented on May 21, 2021

    @DavidGOrtega
    ContributorAuthor

    If you are wondering what is does is prevent other libraries to output in std with console.log. Take into account that console.log is used even is you dont want to

  5. 0x2b3bfa0 commented on May 21, 2021

    @0x2b3bfa0
    Member

    Thanks! I was wondering (admittedly, with a bit of humor) if we could avoid monkey-patching once we improve logging. The current approach is equally useful and puzzling if you overlook those lines.

  6. DavidGOrtega commented on May 21, 2021

    @DavidGOrtega
    ContributorAuthor

    Yeah, JS and its weirdness. Mostly all the logging libs do this internally

  7. changed the title [-][cml-runner] - Better logging[/-] [+]Better logging[/+] on Jul 20, 2021
  8. added
    technical-debt
    ui/ux
    and removed
    cml-runner
    on Aug 31, 2021
  9. 0x2b3bfa0 commented on Aug 31, 2021

    @0x2b3bfa0
    Member

    @DavidGOrtega, feel free to create a new issue starting from the following template and elaborating on each idea, if opportune:

    Follow-up of #22

    • wrap specific CI vendor capabilities
    • heartbeats (in openmetrics format?)
    • file configurable
    • integration with studio

    The proposal would be use winston and a configurable file. We can also collect runner heartbeat using openmetrics format.

  10. DavidGOrtega commented on Sep 2, 2021

    @DavidGOrtega
    ContributorAuthor

    This could be maintained as an epic?

  11. 0x2b3bfa0 commented on Sep 2, 2021

    @0x2b3bfa0
    Member

    I plan to create a new follow-up epic from #703 and we can include all the relevant issues there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

p1-importanttechnical-debtui/ux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions