3 ms·
Ask HN: Looking for an extremely simple logging tool
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.
- hitpointdrew 4y agoYou 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.
- isthispermanent 4y agoI'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.
- f1shy 4y agoAs asked, just one line: LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include <syslog.h> void syslog(int priority, const char *message, ...);
- sargstuff 4y agofrom 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