Commit Graph

24 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
ec41dd2e70 refactor: output logs for completed containers
Previously, a container that exited immediately would just show an error message, which is probably not what we want.

If the pod has exited, we will display the logs on stdout for the user and then exit appropriately.

This change also refactors how log streaming works so that we respect exiting when the stream has no content (such as when the container has exited). Previously, the container would just hang around forever due to not being properly canceled. Due to this refactor, the prefix is now split out into a separate writer.
2024-11-04 14:41:42 -05:00
Jose Diaz-Gonzalez
d8401a4d86 refactor: remove all calls to common.NewShellCmdWithArgs 2024-02-12 20:58:51 -05:00
Jose Diaz-Gonzalez
6908177095 feat: add support for multierror when exiting triggers 2024-01-20 06:57:48 -05:00
Jose Diaz-Gonzalez
db4d8dba88 refactor: consolidate app name verification into golang binary
This change ensures we only have to change this logic once in order to get them to apply to both languages in the codebase.
2022-05-29 11:32:24 -04:00
Jose Diaz-Gonzalez
760be655e9 fix: handle both stderr and stdout when tailing container logs
Previously, stderr was ignored when tailing container log output in golang. This change ensures we capture it and also use the correct helper for that output method.
2021-10-24 20:20:35 -04:00
Jose Diaz-Gonzalez
d55e34a55f refactor: use LogFailWithError to allow a unified exit code for golang commands when the app is missing 2021-02-28 15:20:46 -05:00
Jose Diaz-Gonzalez
eda71e3ffe feat: mirror log tailing support for logs:vector-logs command 2021-01-07 01:43:55 -05:00
Jose Diaz-Gonzalez
d6acf5530e fix: add some comments 2021-01-04 01:14:40 -05:00
Jose Diaz-Gonzalez
fd85b1f605 feat: add vector integration
This currently is missing a few features:

- global sinks
- logrotation

But works fairly well otherwise.
2021-01-04 00:30:22 -05:00
Jose Diaz-Gonzalez
5e4c918d40 feat: trim any extra debug log prefixes 2021-01-02 06:11:51 -05:00
Jose Diaz-Gonzalez
bde77dbf78 feat: cleanup log output for failure case
Also mark DOKKU_DISABLE_ANSI_PREFIX_REMOVAL as deprecated (it will be removed in 0.23.0 and no prefixes will be removed at that time).
2020-11-28 03:32:11 -05:00
Jose Diaz-Gonzalez
84367e1c16 fix: correctly handle injecting environment variables to deployment tasks
Also test that release tasks are invoked the correct environment.

Closes #3817
2020-08-31 15:01:14 -04:00
Jose Diaz-Gonzalez
5965b70b39 fix: do not log empty messages 2020-08-31 02:05:21 -04:00
Jose Diaz-Gonzalez
147abc5c6b feat: add LogDebug 2020-08-30 13:41:15 -04:00
Jose Diaz-Gonzalez
77f211c372 feat: add command for logging container output 2020-08-30 13:41:14 -04:00
Jose Diaz-Gonzalez
dee879538c feat; add common.LogExclaim() 2020-08-30 13:41:14 -04:00
Jose Diaz-Gonzalez
b968ced6e9 refactor: first pass at rewriting apps plugin in go 2020-03-10 14:14:37 -04:00
Jose Diaz-Gonzalez
e5a9d29215 refactor: use Println in favor of Fprintln for os.Stdout 2020-02-22 04:32:51 -05:00
Jose Diaz-Gonzalez
d39f4ce54d feat: add stderr log functions 2020-02-08 19:46:44 -05:00
Jose Diaz-Gonzalez
8d6a1773a3 fix: correct the DOKKU_QUIET_OUTPUT env var check for golang log methods 2019-03-05 21:34:26 -05:00
Jose Diaz-Gonzalez
ad732bd42b feat: add network:report command 2017-10-04 00:58:29 -04:00
Jose Diaz-Gonzalez
acde3d60a7 feat: allow users to bind to all interfaces when a proxy is enabled
- use a plugin trigger to see whether we should bind to all interfaces
- create a generic way of setting properties for a plugin
- migrate proxy-enabled to the new network property "bind-all-interfaces"
- add network:set subcommand
2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
7a4464a8ae feat: more loggers 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
04cd5eeb91 refactor: move all logging functions to their own file 2017-10-02 15:05:13 -07:00