flo-ferox
(Florian Kunzmann)
December 23, 2020, 10:39pm
1
Hi,
I installed the network bindung and use it. I also use the lastSeen item which logs a lot.
I read how to filter logs by editing /srv/openhab2-userdata/etc/org.ops4j.pax.logging.cfg
But this file is read only and I can’t edit it.
Can sameone help me?
I tried ":w !sudo tee %“ but this doesn’t help.
I always get:
“/srv/openhab2-userdata/etc/org.ops4j.pax.logging.cfg” E212: Cannot open file for writing
Press ENTER or type command to continue
rlkoshak
(Rich Koshak)
December 23, 2020, 11:08pm
2
It’s not read only. It’s likely you just don’t have permission to edit as your regular login user. That’s pretty standard for most configuration files like this. Try using sudo
which requests to run what ever follows it as the user root
who can read and write to everything.
flo-ferox
(Florian Kunzmann)
December 23, 2020, 11:17pm
3
No, I also got the same error as root:
sudo vi /srv/openhab2-userdata/etc/org.ops4j.pax.logging.cfg
But I found an other solution. I switched ItemStateChangedEvent to WARN in the openhab-cli console.
But I would prefere filter a single log message…
Like this: openHAB - Filtering event logs
rlkoshak
(Rich Koshak)
December 23, 2020, 11:43pm
4
That’s a very odd path and if you can’t edit it as root you are not running on a normally configured Linux machine. It’s kind of extremely important to tell us that sort of thing. What are you running o? How did you install it?
flo-ferox
(Florian Kunzmann)
December 23, 2020, 11:52pm
5
I used the sd card image.
I was now able to edit the file and added:
r.event.policies.size.size = 16MB
Filtering Rules
log4j2.appender.event.filter.networkLastSeen.type = RegexFilter
networkLastSeen.regex = .(Network_SamsungS10_LastSeen|Network_SamsungA51_LastSeen).
log4j2.appender.event.filter.networkLastSeen.onMatch = DENY
log4j2.appender.event.filter.networkLastSeen.onMisMatch = ACCEPT
Do I have to restart the System or just openhab-cli stop and start?
flo-ferox
(Florian Kunzmann)
December 24, 2020, 5:52am
7
Help!
I restart the System because stop/start doesn’t work for me and now the folder /etc/openhab is gone…
Any ideas why?
Can i fix this?
flo-ferox
(Florian Kunzmann)
December 24, 2020, 10:01am
8
I recreated the structure manually and restored same oder config files from Backup.
it works again…
system
(system)
Closed
February 4, 2021, 2:01am
9
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.