#1 2022-09-30 10:54:31

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,539
Website

Web version of LogView app

I create a WEB version of LogView app using VueJS - available here  https://unitybase.info/logview/index.html
Compressed application size is ~ 1.2Mb a lite bit fat, because I uses UnityBase UI components library and it do not support tree shaking yet (all available components are included)

Current edition implements:
  - opening of local uncompressed filed
  - automatic SQL/JSON beautify
  - all filters available in original LogView app
  - statistic
  - method profiling (top 1000 methods by time)

I wondering how fast and efficient is JS in modern browsers - I test it with files up to 512 Mb and it works pretty fast (at last on my PC. A little faster in Chrome compared to Firefox. Not tested in Safari at all). On 1Gb file fails parsing fails because it implemented using String.split

Offline

#2 2022-09-30 13:53:44

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,205
Website

Re: Web version of LogView app

It sounds great!

(just not able to read log files when the high-resolution timestamps encoding is used)

Offline

#3 2022-09-30 20:24:56

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,539
Website

Re: Web version of LogView app

I will add Hi Resolution timer support and formatting of query in "preview" for mORMot2 SQL log level tomorrow (almost ready)

Offline

#4 2022-10-03 07:36:58

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,539
Website

Re: Web version of LogView app

New version of LogView is published into https://unitybase.info/logview/index.html
- added support for high-resolution timestamps encoding
- SQL log level preview now automatically beautified

BTW if it is possible, I can suggest to structure a DB/SQL log level output to be more parsable (either by logview or by grep etc.)
Currently output format is human readable

DB      mormot.db.sql.postgres.TSqlDBPostgresStatement(7f8105ed9620) Prepare 1.98ms cached as 01 select ID,RandomNumber from public.World where ID=?
SQL     mormot.db.sql.postgres.TSqlDBPostgresStatement(7f8105ed9620) ExecutePrepared 2.19ms 01 rows=1 select ID,RandomNumber from public.World where ID=2799

I propose machine readable  t=nanosec c=cache r=rows q=SQL format. Example:

DB      mormot.db.sql.postgres.TSqlDBPostgresStatement(7f8105ed9620) Prepare t=1980 c=01 q=select ID,RandomNumber from public.World where ID=?
SQL     mormot.db.sql.postgres.TSqlDBPostgresStatement(7f8105ed9620) ExecutePrepared t=2190 c=01 r=1 q=select ID,RandomNumber from public.World where ID=2799

Also it is good to have SQL logged without replacing a parameters by it's values - query plane of parametrized SQL almost always differs from inlined values.
In UnityBase I wrote parameters and parametrized query as such:

Params  	{"P1s39":"doc.main.AddRightsToPositionAssignments"}
SQL     	r=1 t=1821 fr=1817 c=0 q=SELECT A01.ID,A01.type,A01.settingKey,A01.settingValue  FROM ubs_settings A01  WHERE A01.settingKey=:1

where:
- Params = sllCust1 log level in my case
- fr=  is a Time to first row
- q=  is TSQLDBStatement.SQLCurrent

Last edited by mpv (2022-10-03 07:42:41)

Offline

#5 2022-10-03 08:49:43

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,205
Website

Re: Web version of LogView app

Nice web log viewer!

Please see https://github.com/synopse/mORMot2/commit/76c5b2f5 for the log enhancements.
I didn't separate the parameters, because my initial idea was to be able to copy & paste the SQL into a SQL tool and run it directly.
To retrieve the query/statement, you have the c= field.

Offline

Board footer

Powered by FluxBB