Skip to content

Mount the systemd journal as log files. FUSE filesystem

License

Notifications You must be signed in to change notification settings

awfulcooking/journalfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

journalfs

FUSE filesystem presenting the systemd journal as directories of .log files.

Build

  1. sudo apt install libsystemd-dev golang fuse3
  2. make

Install

  1. sudo apt install fuse3

  2. echo "user_allow_other" | sudo tee -a /etc/fuse.conf

  3. sudo make install

  4. Create a system user and group

sudo useradd --system --user-group journalfs
sudo usermod -aG systemd-journal journalfs
sudo usermod -aG journalfs $USER

Note, you'll have to start a new shell or desktop session to activate $USER's group membership.

  1. Create a mount point, set ownership and permissions:
sudo mkdir /journal
sudo chown journalfs:journalfs /journal
sudo chmod 750 /journal
  1. Install the service:
sudo cp contrib/journalfs.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now journalfs

Directories

$ ls -1p /journal
automount/
device/
mount/
path/
scope/
service/
slice/
socket/
swap/
target/
timer/

Directories will contain .log files.

Contributions welcome

Help flesh this out, or fix bugs. See Issues for ideas.

License

GPLv3