Spaces:
Runtime error
Runtime error
Commit
•
7cb2fc2
1
Parent(s):
28757aa
Adding better path for logfile
Browse files- src/visualize_logs.py +3 -1
src/visualize_logs.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
from bs4 import BeautifulSoup
|
2 |
from rich.console import Console
|
3 |
from rich.syntax import Syntax
|
|
|
4 |
|
|
|
5 |
|
6 |
def log_file_to_html_string():
|
7 |
-
log_file = "mylog.log"
|
8 |
num_lines_visualize = 50
|
9 |
|
10 |
console = Console(record=True, width=150, style="#272822")
|
|
|
1 |
from bs4 import BeautifulSoup
|
2 |
from rich.console import Console
|
3 |
from rich.syntax import Syntax
|
4 |
+
from pathlib import Path
|
5 |
|
6 |
+
proj_dir = Path(__name__).parents[1]
|
7 |
|
8 |
def log_file_to_html_string():
|
9 |
+
log_file = proj_dir/"mylog.log"
|
10 |
num_lines_visualize = 50
|
11 |
|
12 |
console = Console(record=True, width=150, style="#272822")
|