📄 mdllog.bas
字号:
Attribute VB_Name = "mdlLog"
'****************************************************************************
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:2007/09/20
'描 述:界面清爽VB版高级专业防火墙 Ver 2.0.3
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Option Explicit
Public Function AscDate() As String
AscDate = Replace$(Date, "/", "_")
End Function
Public Sub LogSecurity(ByVal Severity As String, _
ByVal Description As String)
Dim ff As Long
On Error Resume Next
MkDir App.Path & "\Logs\Security"
ff = FreeFile
Open App.Path & "\Logs\Security\" & AscDate & ".txt" For Append As #ff
Print #ff, "[" & Time & "] " & Severity & " - " & Description
Close #ff
On Error GoTo 0
End Sub
Public Sub LogTraffic(ByVal InOutBlock As String, _
ByVal Description As String)
Dim ff As Long
On Error Resume Next
MkDir App.Path & "\Logs\Traffic\"
ff = FreeFile
Open App.Path & "\Logs\Traffic\" & AscDate & ".txt" For Append As #ff
Print #ff, "[" & Time & "] " & InOutBlock & " - " & Description
Close #ff
On Error GoTo 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -