You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** As of the time of writing, Podman Desktop does not support syslog log driver. The syslog option is only supported when you are running Fn Server in Docker Desktop and Rancher Desktop.
306
+
307
+
308
+
If you have already created an app, you will have to update it using
309
+
`fn update app`. But before you do that you will need a syslog server ready to receive log data.
310
+
311
+
There are multiple options to setup a syslog server for testing. The easiest way is to start up a local syslog server.
312
+
313
+
### Run local syslog docker container
314
+
315
+
The steps are for Linux/MacOS but the steps on Windows should be similar. The syslog container works for both.
316
+
317
+
**Note:** We are using rsyslog/rsyslog container here. For detailed documentation, please check here: https://www.rsyslog.com/doc/getting_started/index.html
318
+
319
+
1. Create a local directory to host the config and log files
320
+
321
+

322
+
>```
323
+
>mkdir mysyslog
324
+
>cd mysyslog
325
+
>mkdir logs
326
+
>```
327
+
2. Prepare the syslog config file
328
+
- Create a file called `my-syslog.conf` under `mysyslog` with the following content
302
329
```
330
+
# Load module
331
+
module(load="imtcp")
332
+
input(type="imtcp" port="601")
303
333
304
-
Since we've already created the 'tutorial' app, we'll have to update it using
305
-
`fn update app`. But before we do that we'll need
306
-
a syslog server ready to receive log data. For the purposes of this
307
-
tutorial we'll setup and use a free [Papertrail](https://papertrailapp.com/)
308
-
account. Papertrail is a cloud log management service. To get setup:
309
-
310
-
1. Sign up for a [free Papertrail account](https://papertrailapp.com/signup?plan=free)
311
-
2. On the Papertrail website, go to 'Settings' (top right hand corner), click on
312
-
'Log Destinations', and click 'Create a Log Destination'.
313
-

314
-
3. In the create dialog, under TCP unselect 'TLS' and under both TCP and UDP
315
-
select'Plain Text'
316
-

317
-
4. Click 'Create'
318
-
5. You'll see the address of your log destination displayed at the top of the
319
-
page looking something like `logs7.papertrailapp.com:<PORT>`. Copy this value
320
-
to your clipboard forusein a minute.
321
-

322
-
323
-
Ok, now that we have a log destination we can update the syslog url of our
324
-
application:
334
+
# Ensure directory exists
335
+
$WorkDirectory /var/log
336
+
337
+
# Log all UDP messages to /var/log/syslog/syslog.log
0 commit comments