Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

From txt to sqlite3 parser of logs

Installation

$ pip install ulars

Usage

Parsing

First of all place lars.yml (see Examples for more info) file in the directory with your .log file then run lars parse one of the following command:

$ lars parse --path PATH_TO_LOG_FILE
$ lars parse --name APP_NAME
$ lars parse --id APP_ID

In order to use --name or --id arguments you have to add applications to lars. To get more information about application management see Application management part.

Application management

Add

To add application to list, use:

$ lars apps add --name APP_NAME --path PATH_TO_LOG_FILE

List

To list all applications, use:

$ lars apps list

Remove

To remove application from list use

$ lars apps remove --id APP_ID

Examples

lars.yml

headers:
  - guid
  - log_date
  - log_level
  - logger_name
  - msg
primary_key: "guid"
table_name: "logs"
separator: " | "
encoding: "utf8"
db_filename: "logs.sqlite3"

.log

9951e948f4a64c859a8589ae111a1eea | 2019-12-05 21:10:06.2561727Z | Debug | Code.Engines.Player.PlayerInputToActionEngine | Found 0 entities with <PlayerInputEntityViewStruct, ActionEntityStruct>
c52029ca8e694c98845a417688c4f0c3 | 2019-12-05 21:10:06.4945353Z | Debug | Code.Engines.Common.MovementEngine | Found 0 entities with <ActionEntityStruct>
1e4c0ba2ebcb486499bfa06f592e3b3d | 2019-12-05 21:10:06.4945353Z | Debug | Code.Engines.Common.MovementEngine | Found 0 entities with <ActionEntityStruct>
e7515daf01484f5196e7bb1a0b6b3329 | 2019-12-05 21:10:06.4945353Z | Debug | Code.Engines.Common.MovementEngine | Found 0 entities with <ActionEntityStruct>

Development

This project includes a number of helpers in the Makefile to streamline common development tasks.

Environment Setup

The following demonstrates setting up and working with a development environment:

### create a virtualenv for development

$ make virtualenv

$ source env/bin/activate


### run lars cli application

$ lars --help


### run pytest / coverage

$ make test

Metadata

Release files for ulars 1.0.9b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ulars 1.0.9b0
File Size Uploaded
ulars-1.0.9b0.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ulars 1.0.9b0
File Interpreter ABI Platform
ulars-1.0.9b0-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / ulars-1.0.9b0.tar.gz

Download URL ulars-1.0.9b0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
724784351a3a03dfbfabf9b8994c531f1350e7761dd48536e4382b1b45d2e77a
BLAKE2b-256 checksum
How to use checksums
467b2b0fba42f929274a4a1edbdf692be70b97f8da32d067ab4f487bd2570a1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.8.0

Release files / ulars-1.0.9b0-py3-none-any.whl

Download URL ulars-1.0.9b0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f810e4654612ab9a896cce8785666dbc2aa49f0b4a43a9e4c486a393b95da4f
BLAKE2b-256 checksum
How to use checksums
78a626e5f12eb749282dae405bf8f04824481403acd89010b0f321498debf610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.8.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page