Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Looking for an extremely simple logging tool
1 point by isthispermanent on Oct 5, 2022 | hide | past | favorite | 4 comments
I just want to be able to insert a line of code...

Example: await thing.sendLog('Here', payload)

...and have that log sent to a Slack workspace.

Just super simple logging to speed up dev time, particularly for debugging. It's just a pain to refresh and comb through CloudWatch or other heavy logs.



You really aren’t providing a lot of context.

> I just want to be able to insert a line of code...

In what, exactly? Java? Python? Rust?

Most languages have very simple logging libraries, that will log to a local file. Most also have slack sdk’s. It should be easy enough to marry the two up.


I've built something for myself before but never maintained it. Really looking for something prebuilt.

JS preferably. But would assume if this existed somewhere it'd be available all major languages.


As asked, just one line:

LIBRARY Standard C Library (libc, -lc)

SYNOPSIS #include <syslog.h>

     void
     syslog(int priority, const char *message, ...);


from shell prompt:

strace program_to_log | grep function_name_syslog_gets_placed_before > file_on_network_location_accessible_to_slack_workspace

alternative one liner:

strace program_to_log | grep function_name_syslog_gets_placed_before > data_log; mail -s 'await thing.sendLog('Here', payload)' slack@user.space data_log




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: