MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / rotate

Method rotate

bbot/logger.py:74–83  ·  view source on GitHub ↗

Compress the source file and move it to the destination.

(self, source, dest)

Source from the content-addressed store, hash-verified

72 return default_name + ".gz"
73
74 def rotate(self, source, dest):
75 """
76 Compress the source file and move it to the destination.
77 """
78 import gzip
79
80 with open(source, "rb") as f_in:
81 with gzip.open(dest, "wb") as f_out:
82 f_out.writelines(f_in)
83 os.remove(source)
84
85 def emit(self, record):
86 """

Callers 8

rFunction · 0.80
myFunction · 0.80
jyFunction · 0.80
vega@5.jsFile · 0.80
vMFunction · 0.80
cFunction · 0.80
dSFunction · 0.80
transformFunction · 0.80

Calls 2

openFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected