Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Commit 0f9bd66

Browse files
committed
total project reconstructed
1 parent 2719e7f commit 0f9bd66

14 files changed

+83
-1664
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This is environment file example.
2+
bugtracker_local_url = local bugtracker url to run tests.
3+
bugtracker_project_api = project API keys for bugtracker.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ dist/
77
logs/
88
.idea/
99
logger.db
10-
FileLogger
10+
FileLogger
11+
.env

README.md

Lines changed: 34 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,48 @@
11
[![Build Status](https://travis-ci.org/p1r-a-t3/zathura.svg?branch=master)](https://travis-ci.org/p1r-a-t3/zathura)
22

33
```
4-
______ ___________
4+
______ ___________
55
___ /______ __ /___ /_____ ______________ _
66
__ / _ __ `/ __/_ __ \ / / /_ ___/ __ `/
7-
_ /__/ /_/ // /_ _ / / / /_/ /_ / / /_/ /
8-
/____/\__,_/ \__/ /_/ /_/\__,_/ /_/ \__,_/
7+
_ /__/ /_/ // /_ _ / / / /_/ /_ / / /_/ /
8+
/____/\__,_/ \__/ /_/ /_/\__,_/ /_/ \__,_/
99
```
10+
1011
# Zathura
11-
Zathura is a sqlite3 based logger. Currently, you can see your error and debug logs from terminal only. However, I am working on webview. Do keep in mind, you will have to handle the authentication for your own project.
1212

13-
-------------------------------
13+
Zathura is a utility package for Bugtracker (<https://github.com/p1r-a-t3/Bugtracker).> Currently, zathura can send error and verbose logs from projects. Future features include parsing `nohup.out` file to check probably logs/errors etc.
14+
15+
---
16+
1417
## How to install
15-
<ul> <pre> pip install zathura </pre> </ul>
18+
19+
`pip install zathura`
20+
1621
This will install the latest version on your virtualenv
1722

18-
-------------------------------
23+
---
24+
1925
## Code Preview
20-
<p>
21-
1. You can just import Zathura from ZathuraProject.zathura and call insert_error_log function to start logging your errors right away.
22-
<pre>
26+
27+
Zathura works with bugtracker. So, You already have a project access token from the bugtracker. It's like 'API Key' to uniquely identify a project.
28+
29+
Here is a simple code snippet to initiate the class and start logging away
30+
31+
```
2332
from ZathuraProject.zathura import Zathura
33+
zathura = Zathura(bugtracker_url="Your_Bugtracker_URL_HERE",
34+
project_token="Your_Project_Token_HERE")
35+
36+
37+
# Logging Error logs.
38+
zathura.send_error_log_bugtracker("An Error name", "A good error description", user = "username")
39+
40+
# Logging verbose Logs
41+
zathura.send_verbose_log_bugtracker("Verbose description", user = "username")
42+
```
43+
44+
user is an optional field in both case. That's it, you just logged an error and a debug message on your server.
45+
46+
---
2447

25-
zathura = Zathura()
26-
zathura.insert_error_log(user_id, error_name, long_error_description)
27-
</pre>
28-
</p>
29-
30-
<p>
31-
2. View your logs from terminal
32-
<pre>
33-
zathura help
34-
</pre>
35-
This will list all the avaiable command for you. Choose from them to see how you want to sort your logs.
36-
<pre>
37-
usage: Zathura COMMAND [args] ...
38-
For example: { Zathura v } will show the current version of this pacakge.
39-
-----------------------------------------------------
40-
-----------------------------------------------------
41-
All commands:
42-
[[ v ]] : Show the current version of this package
43-
[[ developer ]] : Search based on developers name. You can filter out the result based on date and descending order
44-
[[ debug_origin ]] : Shows debug messages based on point of origin. Point of origin is the class/function from where you are adding a message in sqlite.
45-
[[ error_user ]] : Shows error generated under the given username
46-
[[ all_debug ]] : Shows all debug messages
47-
[[ error_name ]] : Shows error based on a error name.
48-
[[ date ]] : Shows error occurred in between a specific date.
49-
[[ all_error ]] : Shows all error messages
50-
[[ origin ]] : Shows error generated on the given point of origin
51-
[[ mark_resolve ]] : Given an error name and point of origin all errors logged on database, is marked resolved.
52-
[[ delete_debug ]] : Deletes the last seven days of debug mesasges from the database. It is useful if you dont want to clutter the database with unnecessary debug info.
53-
[[ help ]] : Shows all the commands necessary to run this package from terminal
54-
-----------------------------------------------------
55-
-----------------------------------------------------
56-
</pre>
57-
For example to see all error, without sorting you can just type
58-
<pre> zathura all_error </pre>
59-
</p>
60-
61-
-------------------------------
62-
63-
<h3>
64-
It is without doubt that there might be some bugs and improvement for this project. I wrote zathura to help me with my projects. If you face any bugs or want some more modules, please open an issue. If you want to contribute, please clone my project and create a pull request for me.
65-
</h3>
66-
67-
<p> Thank you. Ibtehaz </p>
68-
69-
-------------------------------
70-
71-
## Run Zathura codebase on your computer
72-
<ol>
73-
74-
<li>
75-
Clone the project and change your directory into it.
76-
</li>
77-
78-
<li>
79-
pip install -r requirements.txt
80-
</li> <li>
81-
pip install --upgrade setuptools wheel
82-
</li> <li>
83-
python3 setup.py sdist bdist_wheel
84-
<br>
85-
This will create a build file for you from the laterst version.
86-
</li> <li>
87-
pip install . <br>
88-
To check on your machine
89-
</li>
90-
</ol>
48+
With <3 from p1r-a-t3

0 commit comments

Comments
 (0)