Skip to content

log writer

Abdal Security Group edited this page Feb 19, 2022 · 1 revision

usage

import abdal_net_py

try:
    # your code
    print(ddd) # test error
except Exception as e:
    abdal_net_py.error_writer(e, "log.txt")

result sample

[ 2022-02-20 01:11:34 ] - name 'ddd' is not defined  [  Available Memory Usage: 8.32GB ]  [ Total CPU Usage: 100.0% ]  
[ 2022-02-20 01:11:45 ] - name 'ddd' is not defined  [  Available Memory Usage: 8.25GB ]  [ Total CPU Usage: 0.0% ]  
[ 2022-02-20 01:11:46 ] - name 'ddd' is not defined  [  Available Memory Usage: 8.24GB ]  [ Total CPU Usage: 50.0% ]  
[ 2022-02-20 01:11:47 ] - name 'ddd' is not defined  [  Available Memory Usage: 8.24GB ]  [ Total CPU Usage: 0.0% ]  
....
Clone this wiki locally