I would like to debug an issue on my deployed phoenix app. Is there a simple way to enable file logging?
Similar to how rails creates uat.log and production.log
Double-click on the log file and it will likely open in a text program by default, or you can choose the program you'd like to use to open the file by using the right-click and “Open With” option. Another option is to use a web browser and open the server log file in HTML.
Server log files are a raw, unfiltered look at traffic to your site. They're text files stored on your web server. Every time any browser or user-agent, Google included, requests any resource—pages, images, javascript file, whatever—from your server, the server adds a line in the log.
DISM is the primary tool for all offline-servicing tasks. DISM runs from a command prompt from Windows PE or a running Windows operating system. If a failure occurs when executing a DISM command, the tool will provide an immediate response, and log the issue in the DISM. log file.
System Log (syslog): a record of operating system events. It includes startup messages, system changes, unexpected shutdowns, errors and warnings, and other important processes. Windows, Linux, and macOS all generate syslogs.
I fixed this by using this library:
https://github.com/onkel-dirtus/logger_file_backend
I added it to my mix.exs
{:logger_file_backend, "0.0.4"}
And then added this to my environment config (dev.exs and prod.exs):
config :logger, format: "[$level] $message\n",
backends: [{LoggerFileBackend, :error_log}, :console]
config :logger, :error_log,
path: "log/error.log",
level: :error
More information can be found in the Logger docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With