# Collecting logs from chroot

## Purpose:

To collect logs from a chroot using an AxoSyslog client running on the host, complete the following steps:

![Collecting logs from chroot](/docs/axosyslog-core/chapter-examples/example-chroot/fig-chroot01.png)

## Steps:

  1. Create a `/dev` directory within the chroot. The applications running in the chroot send their log messages here.

  2. Create a local source in the configuration file of the AxoSyslog application running outside the chroot. This source should point to the `/dev/log` file within the chroot (for example, to the `/chroot/dev/log` directory).

  3. Include the source in a log statement.

Note You need to set up timezone information within your chroot as well. This usually means creating a symlink to `/etc/localtime`. 




Last modified October 29, 2023: [Moves figures to local directories because they weren't displayed in production (247ee161)](<https://github.com/axoflow/axosyslog-core-docs/commit/247ee161cb265c6587c6f444f3b3b49809747b0d>)