How to disable all logs?

I have small hdd.
I need turn of logging to /var/log/openhab/events.log and openhab.log

According to the log filenames you use OH3.
Have a look to Logging | openHAB
This is one example Log filtering in OH 3

Thanx, but it doesn’t help me.
I want that logs don’t writes to /var/log/openhab/events.log and openhab.log.
But displayed in karaf console

Why do you think that it will not work ?
Add filters to suppress logging to the related file appenders.

Depending on the way you use for configuring logging subsystem, this might be all you need in org.ops4j.pax.logging.cfg:

log4j2.rootLogger.level = INFO
# to make log:tail command work
log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi

second case, print out to stdout

log4j2.rootLogger.level = INFO
# print out to stdout
log4j2.rootLogger.appenderRef.Console.ref = Console
# change this section to filter levels you wish to see
#log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
#log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-DEBUG}
log4j2.appender.console.type = Console
log4j2.appender.console.name = Console
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = ${log4j2.out.pattern}

With XML its similar, but you have to consult that with Apache Log4j 2 configuration: Log4j – Configuring Log4j 2.

Good luck!