Skip to content

Commit

Permalink
Merge pull request #58
Browse files Browse the repository at this point in the history
  • Loading branch information
elB4RTO authored May 14, 2024
2 parents abc5aa7 + e46c05b commit 7c13a44
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 23 deletions.
45 changes: 32 additions & 13 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ name: CMake Build
on:
pull_request:
branches: [ "main" ]
# push:
# branches: [ "main" ]
# release:
# types: [published]

env:
QT_VERSION: '6.6.*'
BUILD_TYPE: 'MinSizeRel'
BUILD_TYPE: 'Release'
SRC_DIR: "${{github.workspace}}/logdoctor"
BUILD_DIR: "${{github.workspace}}/build"
RELEASE_DIR: "${{github.workspace}}/release"
# TAG: ${{ github.event.release.tag_name }}

jobs:
build:
Expand All @@ -18,13 +22,13 @@ jobs:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, arch: gcc_64 }
- { os: windows-latest, arch: win64_msvc2019_64 }
- { os: macos-latest, arch: clang_64 }
- { os: ubuntu-latest, arch: gcc_64, exec: LogDoctor }
- { os: windows-latest, arch: win64_msvc2019_64, exec: LogDoctor.exe }
- { os: macos-latest, arch: clang_64, exec: LogDoctor.app }

steps:
- name: Get LogDoctor
uses: actions/checkout@v3
uses: actions/checkout@v4


- name: Install Qt6
Expand All @@ -37,12 +41,11 @@ jobs:
archives: 'icu qtbase qttools qttranslations'
tools: 'tools_ifw tools_cmake tools_qtcreator,qt.tools.qtcreator'
install-deps: 'true'
setup-python: 'false'


- name: Get MSVC (WIN)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1.12.1
uses: ilammy/msvc-dev-cmd@v1.13.0


- name: Append PATHs (WIN)
Expand All @@ -55,17 +58,33 @@ jobs:

- name: Configure CMake (NIX)
if: runner.os != 'Windows'
run: cmake -S ${{github.workspace}}/logdoctor -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -S ${{env.SRC_DIR}} -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Configure CMake (WIN)
if: runner.os == 'Windows'
run: cmake -S ${{github.workspace}}\logdoctor -B ${{github.workspace}}\build "-DCMAKE_BUILD_TYPE:STRING=${{env.BUILD_TYPE}}" "-DCMAKE_GENERATOR:STRING=NMake Makefiles JOM" "-DCMAKE_MAKE_PROGRAM:STRING=jom" "-DCMAKE_CXX_COMPILER=cl.exe"
run: cmake -S ${{env.SRC_DIR}} -B ${{env.BUILD_DIR}} "-DCMAKE_BUILD_TYPE:STRING=${{env.BUILD_TYPE}}" "-DCMAKE_GENERATOR:STRING=NMake Makefiles JOM" "-DCMAKE_MAKE_PROGRAM:STRING=jom" "-DCMAKE_CXX_COMPILER=cl.exe"


- name: Build
run: cmake --build ${{github.workspace}}/build --target all
run: cmake --build ${{env.BUILD_DIR}} --target all -j16

- name: Test
working-directory: ${{github.workspace}}/build
working-directory: ${{env.BUILD_DIR}}
run: ctest

- name: Prepare deployment
run: |
mkdir "${{env.RELEASE_DIR}}"
mv "${{env.BUILD_DIR}}/${{matrix.config.exec}}" "${{env.RELEASE_DIR}}/"
# echo "RELEASE_NAME=LogDoctor-${TAG:1}-amd64_${{matrix.config.osname}}" >> $GITHUB_ENV

- name: Deploy
uses: actions/upload-artifact@v4
with:
# name: ${{env.RELEASE_NAME}}
name: 'LogDoctor_${{matrix.config.os}}'
path: ${{env.RELEASE_DIR}}
if-no-files-found: error
compression-level: 9
retention-days: 7

18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1>LogDoctor</h1>
<p>Parse Apache2 / Nginx / IIS logs and view dynamically generated statistics</p>
<br/>
<img src="https://img.shields.io/badge/version-4.00-fff"/>
<img src="https://img.shields.io/badge/version-4.01-fff"/>
<img src="https://img.shields.io/badge/C%2B%2B-20-blue"/>
<img src="https://img.shields.io/badge/Qt-6-blue"/>
<br/>
Expand Down Expand Up @@ -120,7 +120,6 @@ See [HOW_TO_COMPILE.md](https://github.com/elB4RTO/LogDoctor/blob/main/HOW_TO_CO

### Version check

A version check utility is available while running LogDoctor to check the availability of a new version.<br/>
To check for updates, open the menu `Utilities``Version check`.<br/><br/>

### How to update
Expand All @@ -131,8 +130,8 @@ See [HOW_TO_UPDATE.md](https://github.com/elB4RTO/LogDoctor/blob/main/HOW_TO_UPD

## Before to start

When you run LogDoctor for the first time, please take a minute to set-up the things it needs.<br/>
Head to the **configurations** section and give a look at least at the [logs format](#logs-format) settings. You have to tell the doctor what he'll be dealing with!
When you run LogDoctor for the first time, you will most likely see an empty list of log files.<br/>
Head to the **configurations** section and give a look at least at the [logs format](#logs-format) settings. Only files containings logs that match the given format will be shown in the list.

<br/><br/>

Expand Down Expand Up @@ -174,8 +173,7 @@ When you parse a file, it will be hashed using the **SHA256** algorithm and the

##### Note

If you don't know, *SHA256* produces an irreversible hash, which means that no information about the file can be retrieved from the hash.<br/>
You have full control on the hashes database (same as for the logs-data database): you can move, delete, view or edit it the way you want (but you must keep the original file-name).<br/>
The *SHA256* algorithm produces an irreversible hash, which means that no information about the file can be retrieved from the hash.<br/>
LogDoctor will **never** grab and/or use any information about you or the usage you make of it.

<br/>
Expand All @@ -189,8 +187,8 @@ It can be the default system folder or any folder you decide to use, just set it

#### Logs format

Before to start parsing logs, you must set-up the *log format* that LogDoctor will have to use.<br/>
Head to the **configurations** section, tap `Logs`, select the **Web Server** you want to configure and tap `Format`.<br/>
Before to start parsing logs, you must set-up the *loga format*.<br/>
Head to the **configurations** section, under `Logs` select the **Web Server** you want to configure and tap `Format`.<br/>
Once inside the **Format** section, you can insert the *log format string* you're using. Don't forget to use the `Generete preview` button to generate a *log line sample* and **check the correctness** of the format!<br/>

For reliability reasons, LogDoctor **does not** support the usage of the **Carriage Return** inside the log format string.
Expand Down Expand Up @@ -384,15 +382,15 @@ A new backup is made every time you quit LogDoctor after doing a job which affec
#### Note

Only the *logs-data database* will be backed-up, the *hashes database* **won't**.<br/>
This is because it is unlikely (supposedly impossible) that a hash equals another, therefore they're supposed to be useful for a short period of time (that is, since you or your web server delete the original log files).
This is because it is unlikely (supposedly impossible) that a hash equals another, therefore they're supposed to be useful for a short period of time (that is, until you or your web server delete the original log files).

<br/>

### Estimated working speed

10~200 MB/s

May be higher or lower depending on the complexity of the logs, the complexity of the blacklist, the build type, your hardware and the workload of your system during the execution.
Take this estimation with a grain of salt, it may be even higher or lower depending on a variety of factors, like: the build type, your hardware, the complexity of the logs, the complexity of the blacklist, the workload of your system during the execution...

<br/><br/>

Expand Down

0 comments on commit 7c13a44

Please sign in to comment.