log-viewer icon indicating copy to clipboard operation
log-viewer copied to clipboard

Log not showing up

Open menih opened this issue 4 years ago • 7 comments
trafficstars

I tried opening a log file and it is not showing up. I than defined a regex based log format but it still came up empty. How do debug?

menih avatar Sep 25 '21 04:09 menih

It should show the log even you have not specified the format. What do you see when it is not showing up? Is there any error in the browser's console?

sevdokimov avatar Sep 27 '21 10:09 sevdokimov

I see a blank page

On Mon, Sep 27, 2021 at 3:16 AM Sergey Evdokimov @.***> wrote:

It should show the log even you have not specified the format. What do you see when it is not showing up? Is there any error in the browser's console?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sevdokimov/log-viewer/issues/82#issuecomment-927726492, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2FAFIQKUCVIU3QJ76RG3LUEBAAJANCNFSM5EXFUV2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

menih avatar Sep 27 '21 17:09 menih

Having the same here

fautpasycraindre avatar Jan 18 '22 13:01 fautpasycraindre

Having the same here

Nadimibox avatar Feb 24 '22 06:02 Nadimibox

@MrNadimi Could you attach a sample of the log?

sevdokimov avatar Feb 24 '22 06:02 sevdokimov

@sevdokimov Sorry for the delay

This is the logs directory

Screenshot from 2022-04-07 04-31-34

With the default settings I can only see the original log file and unfortunately the rest are not viewed:

Screenshot from 2022-04-07 04-37-15

ٔNote: I can watch all the logs by reading the documentation and changing the settings below

@Bean
    public LogConfigurationLoader logConfigurationLoader() {
        return new LogConfigurationLoader() {
            @Override @NonNull
            public Map<Path, LogFormat> getLogConfigurations() {
                Map<Path , LogFormat> result = new LinkedHashMap<>();
                File logDir = new File(AppUtils.getProjectDir() + File.separator + logPath.substring(1) );
                for (File logFile : Objects.requireNonNull(logDir.listFiles())){
                    result.put(Paths.get(logFile.getAbsolutePath()) , null);
                }
                return result;
            }
        };
    }

Result:

Screenshot from 2022-04-07 04-45-37

But after executing the settings, I get the following error

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.logviewer.formats.utils.FastDateTimeParser (file:/home/bahram/.gradle/caches/modules-2/files-2.1/io.github.sevdokimov.logviewer/log-viewer/1.0.3/868d8d6f489cfd6a6d4928b8d7ad5dffe127418f/log-viewer-1.0.3.jar) to method java.time.format.DateTimeFormatter.parseUnresolved0(java.lang.CharSequence,java.text.ParsePosition) WARNING: Please consider reporting this to the maintainers of com.logviewer.formats.utils.FastDateTimeParser WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

Nadimibox avatar Apr 07 '22 08:04 Nadimibox

i've to rename all my logs to have txt extension for log-viewer to open files...

mator avatar Jun 16 '22 12:06 mator