diff --git a/ibm5250/Emulator/classEmulator.vb b/ibm5250/Emulator/classEmulator.vb index b5fc812..dbec6eb 100644 --- a/ibm5250/Emulator/classEmulator.vb +++ b/ibm5250/Emulator/classEmulator.vb @@ -43,8 +43,6 @@ Public Event DataReady(ByVal Bytes() As Byte, ByVal OpCode As TN5250.OpCodes) Public Event StartupResponseReceived(ByVal ResponseCode As String) - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger() - Public Locale As Localization.Locale Public LocaleInfo As Localization @@ -315,7 +313,6 @@ Private Sub Handle_Text(ByRef text As String, ByVal Attribute As Emulator.EmulatorScreen.FieldAttribute) If text IsNot Nothing Then - Logger.Trace(vbTab & "Text: '" & text & "'") text = Nothing End If End Sub @@ -363,13 +360,11 @@ start += 1 Dim Cmd As Command = CType(buf(start), Command) start += 1 - Logger.Trace(Cmd.ToString & vbLf) Select Case Cmd 'XXX lots more commands to deal with here! Case Command.CLEAR_UNIT - 'Logger.Trace(Cmd.ToString & vbLf) 'XXX 'Locks the workstation keyboard @@ -416,7 +411,6 @@ Return False Else Dim Param As Byte = buf(start) - Logger.Trace(vbTab & "Param: &H" & Hex(Param)) start += 1 Select Case Param Case 0 @@ -458,21 +452,6 @@ Dim cc As New EmulatorScreen.ControlCharacter(buf(start), buf(start + 1)) start += 2 - Logger.Trace(vbTab & "---Pre flags---") - Logger.Trace(vbTab & "Non-Stream Data: " & cc.Flags.Pre.Non_Stream_Data.ToString) - Logger.Trace(vbTab & "Null all non-bypass fields: " & cc.Flags.Pre.Null_All_Non_Bypass_Fields.ToString) - Logger.Trace(vbTab & "Null all non-bypass fields with MDT on: " & cc.Flags.Pre.Null_All_Non_Bypass_Fields_With_MDT_On.ToString) - Logger.Trace(vbTab & "Reset MDT flags in all fields: " & cc.Flags.Pre.Reset_MDT_Flags_In_All_Fields.ToString) - Logger.Trace(vbTab & "Reset MDT flags in non-bypass fields: " & cc.Flags.Pre.Reset_MDT_Flags_In_Non_Bypass_Fields.ToString) - Logger.Trace(vbTab & "Reset pending AID and lock keyboard: " & cc.Flags.Pre.Reset_Pending_AID_And_Lock_Keyboard.ToString) - Logger.Trace(vbTab & "---Post flags---") - Logger.Trace(vbTab & "Cursor moves when keyboard unlocks: " & cc.Flags.Post.Cursor_Moves_When_Keyboard_Unlocks.ToString) - Logger.Trace(vbTab & "Reset blinking cursor: " & cc.Flags.Post.Reset_Blinking_Cursor.ToString) - Logger.Trace(vbTab & "Set blinking cursor: " & cc.Flags.Post.Set_Blinking_Cursor.ToString) - Logger.Trace(vbTab & "Set message waiting indicator off: " & cc.Flags.Post.Set_Message_Waiting_Indicator_Off.ToString) - Logger.Trace(vbTab & "Set message waiting indicator on: " & cc.Flags.Post.Set_Message_Waiting_Indicator_On.ToString) - Logger.Trace(vbTab & "Sound alarm: " & cc.Flags.Post.Sound_Alarm.ToString) - Logger.Trace(vbTab & "Reset pending AID and unlock keyboard: " & cc.Flags.Post.Unlock_Keyboard_And_Reset_Pending_AID.ToString) If cc.Flags.Pre.Reset_Pending_AID_And_Lock_Keyboard Then Me.Keyboard.State = EmulatorKeyboard.Keyboard_State.Normal_Locked @@ -506,9 +485,6 @@ 'Dim attr As IBM5250.ColorFieldAttribute = CType(b, IBM5250.ColorFieldAttribute) 'CurrentAttribute = CType(b, IBM5250.FieldAttribute.ColorAttribute) CurrentAttribute = New Emulator.EmulatorScreen.FieldAttribute(b, Me.Screen.DefaultForeColor, Screen.BackColor) - Logger.Trace(vbTab & "----------") - Logger.Trace(vbTab & "Attribute: " & CurrentAttribute.Attribute.ToString) - Logger.Trace(vbTab & "----------") text += " " 'attributes are displayed as spaces 'attribute may apply to a field, so we need to update field attributes here. @@ -517,8 +493,6 @@ Else Dim e As Byte = EBCDIC_To_UTF8(New Byte() {b})(0) - 'Logger.Trace(vbTab & "Data byte: &H" & Hex(e) & vbTab & "[" & Chr(e) & "]") - 'Logger.Trace(vbTab & "Data byte: [" & see.see_ebc(b) & "]") text += Chr(e) 'ThisByteWasText = True End If @@ -528,9 +502,6 @@ If [Enum].IsDefined(GetType(EmulatorScreen.WTD_Order), b) Then 'Case 1 To 3, &H10 To &H15, &H1D 'Orders Dim Order As EmulatorScreen.WTD_Order = CType(b, EmulatorScreen.WTD_Order) - Logger.Trace(vbTab & "----------") - Logger.Trace(vbTab & "Order: " & Order.ToString) - Logger.Trace(vbTab & "----------") Select Case Order Case EmulatorScreen.WTD_Order.Set_Buffer_Address 'The set buffer address (SBA) order specifies the address at which data transfer and input field definition will begin. Any location within the @@ -539,7 +510,6 @@ Row = buf(start) Col = buf(start + 1) start += 2 - Logger.Trace(vbTab & vbTab & "Address: (" & Row.ToString & ", " & Col.ToString & ")") If (Row > 0 And Row <= Me.Screen.Rows) And (Col > 0 And Col <= Me.Screen.Columns) Then Screen.Row = Row @@ -555,7 +525,6 @@ Row = buf(start) Col = buf(start + 1) start += 2 - Logger.Trace(vbTab & vbTab & "Address: (" & Row.ToString & ", " & Col.ToString & ")") If (Row > 0 And Row <= Me.Screen.Rows) And (Col > 0 And Col <= Me.Screen.Columns) Then Screen.HomeCoordinates.Row = Row @@ -572,7 +541,6 @@ Row = buf(start) Col = buf(start + 1) start += 2 - Logger.Trace(vbTab & vbTab & "Address: (" & Row.ToString & ", " & Col.ToString & ")") If (Row > 0 And Row <= Me.Screen.Rows) And (Col > 0 And Col <= Me.Screen.Columns) Then 'XXX It's unclear whether we're supposed to move now or at the end of the WTD. @@ -596,9 +564,7 @@ Col = buf(start + 1) c = buf(start + 2) start += 3 - Logger.Trace(vbTab & vbTab & "Address: (" & Row.ToString & ", " & Col.ToString & ")") Dim e As Byte = EBCDIC_To_UTF8(New Byte() {c})(0) - Logger.Trace(vbTab & vbTab & "Character: &H" & Hex(e) & vbTab & "[" & Chr(e) & "]") If (Row > 0 And Row <= Me.Screen.Rows) And (Col > 0 And Col <= Me.Screen.Columns) Then If Screen.GetTextBufferAddress(Row, Col) >= Screen.GetTextBufferAddress() Then @@ -620,7 +586,6 @@ Col = buf(start + 1) ListLen = buf(start + 2) start += 3 - Logger.Trace(vbTab & vbTab & "Address: (" & Row.ToString & ", " & Col.ToString & ")") If (ListLen < 2) Or (ListLen > 5) Then RaiseEvent DataStreamError(NegativeResponse.Write_Data_Length_Not_Valid) Return False @@ -628,7 +593,6 @@ Dim AttributeTypes(ListLen - 2) As EmulatorScreen.Erase_To_Address_Attribute_Types For i As Integer = 0 To AttributeTypes.Length - 1 AttributeTypes(i) = buf(start) - Logger.Trace(vbTab & vbTab & "Attribute Type: " & AttributeTypes(i).ToString) start += 1 If (AttributeTypes(i) > EmulatorScreen.Erase_To_Address_Attribute_Types.Extended_Ideographic_Attributes) And (AttributeTypes(i) <> EmulatorScreen.Erase_To_Address_Attribute_Types.All) Then @@ -663,12 +627,6 @@ End If start += hdr.Length + 1 'The length byte itself is not included in the length value, so add 1 - Logger.Trace(vbTab & vbTab & "Length: " & hdr.Length.ToString) - Logger.Trace(vbTab & vbTab & "Flag: &H" & Hex(hdr.Flag)) - Logger.Trace(vbTab & vbTab & "Starting Field for Reads: " & hdr.Starting_Field_For_Reads.ToString) - Logger.Trace(vbTab & vbTab & "Error row: " & hdr.Error_Row.ToString) - 'Logger.Trace(vbTab & vbTab & "PFxx data inhibit bits: &H" & Hex(hdr.PF_Data_Inhibit)) - Logger.Trace(vbTab & vbTab & "Inhibited PFxx keys: " & String.Join(",", hdr.Inhibited_AID_Codes)) Me.Screen.Header = hdr @@ -699,8 +657,6 @@ Dim AttrType As Byte = buf(start) Dim Attr As Byte = buf(start + 1) start += 2 - Logger.Trace(vbTab & vbTab & "Attribute Type: &H" & Hex(AttrType) & "(unimplemented)") - Logger.Trace(vbTab & vbTab & "Attribute: &H" & Hex(Attr) & "(unimplemented)") RaiseEvent DataStreamError(NegativeResponse.Extended_Attribute_Type_Not_Valid) Return False @@ -724,28 +680,12 @@ ' field in the format table in accordance with the FFW, and writes the leading and ending field attributes. Dim hdr As New EmulatorScreen.StartOfField_Header(buf, start, Screen.DefaultForeColor, Screen.BackColor) start += hdr.Length - Logger.Trace(vbTab & vbTab & "Length: " & hdr.Length.ToString) - - Logger.Trace(vbTab & vbTab & "Field Format Word: &H" & Hex(hdr.FieldFormatWord.Raw)) - Logger.Trace(vbTab & vbTab & " Bypass: " & hdr.FieldFormatWord.Bypass.ToString) - Logger.Trace(vbTab & vbTab & " Dup or Field Mark Enable: " & hdr.FieldFormatWord.Dup_Or_Field_Mark_Enabled.ToString) - Logger.Trace(vbTab & vbTab & " Modified Data Tag: " & hdr.FieldFormatWord.Modified.ToString) - Logger.Trace(vbTab & vbTab & " Field Shift/Edit Spec: " & hdr.FieldFormatWord.Shift_Edit_Spec.ToString) - Logger.Trace(vbTab & vbTab & " Auto Enter: " & hdr.FieldFormatWord.Auto_Enter_On_Exit.ToString) - Logger.Trace(vbTab & vbTab & " Field Exit Required: " & hdr.FieldFormatWord.Field_Exit_Key_Required.ToString) - Logger.Trace(vbTab & vbTab & " Monocase: " & hdr.FieldFormatWord.UpperCase.ToString) - Logger.Trace(vbTab & vbTab & " Mandatory Enter: " & hdr.FieldFormatWord.Mandatory_Enter.ToString) - Logger.Trace(vbTab & vbTab & " Mandatory Fill: " & hdr.FieldFormatWord.Mandatory_Fill.ToString) For Each fcw As EmulatorScreen.StartOfField_Header.FCW In hdr.FieldControlWords - Logger.Trace(vbTab & vbTab & "Field Control Word: &H" & Hex(fcw.Raw)) - Logger.Trace(vbTab & vbTab & " Type: " & fcw.Type.ToString) Select Case fcw.Type Case EmulatorScreen.StartOfField_Header.FCW_Type.Highlighted Dim a As New EmulatorScreen.FieldAttribute(fcw.Data) - Logger.Trace(vbTab & vbTab & " Attribute: " & a.Attribute.ToString) Case Else - Logger.Trace(vbTab & vbTab & " Data: &H" & Hex(fcw.Data)) End Select 'The first FCW of any type is used. Subsequent FCWs of the same type are ignored. 'The 5494 does not check to determine if the FCWs are formatted correctly or if @@ -760,9 +700,6 @@ ' Return False 'End If Next - Logger.Trace(vbTab & vbTab & "Leading Field Attribute: " & hdr.LeadingFieldAttribute.Attribute.ToString) - Logger.Trace(vbTab & vbTab & "Field Length: " & hdr.FieldLength.ToString) - Logger.Trace(vbTab & vbTab & "Is Input Field: " & hdr.IsInputField.ToString) 'It's OK to start a field at (1,0) as a special case per documentation. 'It's OK to start a field on the last column because the first byte is the leading attribute, so the field will start on the next line. @@ -808,8 +745,6 @@ Case EmulatorScreen.WTD_Order.Write_To_Display_Structured_Field Dim sf As New EmulatorScreen.StructuredField(buf, start, Me.Screen) - Logger.Trace(vbTab & vbTab & "Length: " & sf.Length.ToString) - Logger.Trace(vbTab & vbTab & "Command: " & sf.Command.ToString) Select Case sf.Command Case EmulatorScreen.StructuredField.WSFCommand.Define_Selection_Field 'XXX we don't currently support selection fields @@ -818,11 +753,6 @@ Case EmulatorScreen.StructuredField.WSFCommand.Create_Window If sf.Length > 8 Then Dim cwh As New EmulatorScreen.StructuredField.CreateWindowHeader(buf, start + (sf.Length - sf.Data.Length), sf.Data.Length, sf) - Logger.Trace(vbTab & vbTab & vbTab & "Rows: " & cwh.Rows.ToString) - Logger.Trace(vbTab & vbTab & vbTab & "Columns: " & cwh.Columns.ToString) - Logger.Trace(vbTab & vbTab & vbTab & "IsPullDownMenuBar: " & cwh.IsPullDownMenuBar.ToString) - Logger.Trace(vbTab & vbTab & vbTab & "CursorRestrictedToWindow: " & cwh.CursorRestrictedToWindow.ToString) - Logger.Trace(vbTab & vbTab & vbTab & "Minor Structures: " & cwh.MinorStructures.Length.ToString) Dim RemainingRows As Integer = Me.Screen.Rows - Me.Screen.Row Dim RemainingCols As Integer = Me.Screen.Columns - Me.Screen.Column @@ -835,38 +765,16 @@ For i As Integer = 0 To cwh.MinorStructures.Length - 1 Select Case cwh.MinorStructures(i).GetType Case GetType(Emulator.EmulatorScreen.StructuredField.CreateWindowHeader.WindowTitle_Or_Footer) - Logger.Trace(vbTab & vbTab & vbTab & "Window Title or Footer:") - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Length: " & cwh.MinorStructures(i).Length.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Orientation: " & cwh.MinorStructures(i).Orientation.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Element: " & cwh.MinorStructures(i).Element.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Monochrome Attribute: " & cwh.MinorStructures(i).MonochromeAttribute.Attribute.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Color Attribute: " & cwh.MinorStructures(i).ColorAttribute.Attribute.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Text: " & cwh.MinorStructures(i).Text.ToString) If (cwh.MinorStructures(i).Length < 7) Then RaiseEvent DataStreamError(NegativeResponse.Structured_Field_Minor_Structure_Length_Not_Valid) Return False End If Case GetType(Emulator.EmulatorScreen.StructuredField.CreateWindowHeader.BorderPresentation) - Logger.Trace(vbTab & vbTab & vbTab & "Border Presentation:") - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Length: " & cwh.MinorStructures(i).Length.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "UseBorderPresentationCharacters: " & cwh.MinorStructures(i).UseBorderPresentationCharacters.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Element: " & cwh.MinorStructures(i).Element.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Monochrome Attribute: " & cwh.MinorStructures(i).MonochromeAttribute.Attribute.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "Color Attribute: " & cwh.MinorStructures(i).ColorAttribute.Attribute.ToString) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "TopLeftChar: " & cwh.MinorStructures(i).TopLeftChar) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "TopChar: " & cwh.MinorStructures(i).TopChar) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "TopRightChar: " & cwh.MinorStructures(i).TopRightChar) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "LeftChar: " & cwh.MinorStructures(i).LeftChar) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "RightChar: " & cwh.MinorStructures(i).RightChar) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "BottomLeftChar: " & cwh.MinorStructures(i).BottomLeftChar) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "BottomChar: " & cwh.MinorStructures(i).BottomChar) - Logger.Trace(vbTab & vbTab & vbTab & vbTab & "BottomRightChar: " & cwh.MinorStructures(i).BottomRightChar) If (cwh.MinorStructures(i).Length < 4) Or (cwh.MinorStructures(i).Length > 13) Then RaiseEvent DataStreamError(NegativeResponse.Structured_Field_Minor_Structure_Length_Not_Valid) Return False End If Case Else - Logger.Trace(vbTab & vbTab & vbTab & "Unknown Minor Structure type!") RaiseEvent DataStreamError(NegativeResponse.Structured_Field_Minor_Structure_Parameter_Not_Valid) Return False End Select @@ -939,9 +847,7 @@ RaiseEvent DataStreamError(NegativeResponse.Command_Not_Valid) Return False End Select - Logger.Trace(vbTab & "----------") Else - Logger.Trace(vbTab & "ERROR: Unknown WTD Order: &H" & Hex(b)) RaiseEvent DataStreamError(NegativeResponse.Command_Not_Valid) Return False End If @@ -949,7 +855,6 @@ End If 'If (Not ThisByteWasText) And (text IsNot Nothing) Then - ' Logger.Trace(vbTab & "Text: '" & text & "'") ' text = Nothing 'End If @@ -1015,21 +920,6 @@ Me.Invited = True 'RFC1205 says "A work station is said to be 'invited' when the server has sent a read command to the client." Dim cc As New EmulatorScreen.ControlCharacter(buf(start), buf(start + 1)) start += 2 - Logger.Trace(vbTab & "---Pre flags---") - Logger.Trace(vbTab & "Non-Stream Data: " & cc.Flags.Pre.Non_Stream_Data.ToString) - Logger.Trace(vbTab & "Null all non-bypass fields: " & cc.Flags.Pre.Null_All_Non_Bypass_Fields.ToString) - Logger.Trace(vbTab & "Null all non-bypass fields with MDT on: " & cc.Flags.Pre.Null_All_Non_Bypass_Fields_With_MDT_On.ToString) - Logger.Trace(vbTab & "Reset MDT flags in all fields: " & cc.Flags.Pre.Reset_MDT_Flags_In_All_Fields.ToString) - Logger.Trace(vbTab & "Reset MDT flags in non-bypass fields: " & cc.Flags.Pre.Reset_MDT_Flags_In_Non_Bypass_Fields.ToString) - Logger.Trace(vbTab & "Reset pending AID and lock keyboard: " & cc.Flags.Pre.Reset_Pending_AID_And_Lock_Keyboard.ToString) - Logger.Trace(vbTab & "---Post flags---") - Logger.Trace(vbTab & "Cursor moves when keyboard unlocks: " & cc.Flags.Post.Cursor_Moves_When_Keyboard_Unlocks.ToString) - Logger.Trace(vbTab & "Reset blinking cursor: " & cc.Flags.Post.Reset_Blinking_Cursor.ToString) - Logger.Trace(vbTab & "Set blinking cursor: " & cc.Flags.Post.Set_Blinking_Cursor.ToString) - Logger.Trace(vbTab & "Set message waiting indicator off: " & cc.Flags.Post.Set_Message_Waiting_Indicator_Off.ToString) - Logger.Trace(vbTab & "Set message waiting indicator on: " & cc.Flags.Post.Set_Message_Waiting_Indicator_On.ToString) - Logger.Trace(vbTab & "Sound alarm: " & cc.Flags.Post.Sound_Alarm.ToString) - Logger.Trace(vbTab & "Reset pending AID and unlock keyboard: " & cc.Flags.Post.Unlock_Keyboard_And_Reset_Pending_AID.ToString) 'The format of the control character following the READ MDT FIELDS command is identical to that in the WTD command. The 5494 completes 'the actions indicated by this character after servicing the READ MDT FIELDS command. @@ -1067,8 +957,6 @@ Dim sf As New EmulatorScreen.StructuredField(buf, start, Me.Screen) start += sf.Length - Logger.Trace(vbTab & "Length: " & sf.Length.ToString) - Logger.Trace(vbTab & "Command: " & sf.Command.ToString) Select Case sf.Command Case EmulatorScreen.StructuredField.WSFCommand.Query @@ -1099,7 +987,6 @@ End If Case Else 'XXX - Logger.Trace(vbTab & "***UNIMPLEMENTED***") RaiseEvent DataStreamError(NegativeResponse.Structured_Field_Type_Not_Valid) Return False End Select @@ -1108,7 +995,6 @@ Case Command.WRITE_ERROR_CODE, Command.WRITE_ERROR_CODE_TO_WINDOW 'XXX there's a lot more to think about here 'XXX WRITE_ERROR_CODE_TO_WINDOW should behave differently, but this is how Client Access does it and it's easy. - Logger.Trace(vbTab & "----------") Select Case Cmd Case Command.WRITE_ERROR_CODE If buf(start) = EmulatorScreen.WTD_Order.Insert_Cursor Then @@ -1116,13 +1002,10 @@ Screen.Column = buf(start + 2) start += 2 End If - Logger.Trace(vbTab & "Insert Cursor: " & Screen.Row & "," & Screen.Column) Case Command.WRITE_ERROR_CODE_TO_WINDOW Dim StartColumn As Byte = buf(start) Dim EndColumn As Byte = buf(start + 1) start += 2 - Logger.Trace(vbTab & "Start Column: " & StartColumn.ToString) - Logger.Trace(vbTab & "End Column: " & EndColumn.ToString) 'There are two negative responses associated with this command: ' NegativeResponse.Write_Error_Code_To_Window_Not_Valid_With_Current_Error_Line ' NegativeResponse.Write_Error_Code_To_Window_Row_Col_Address_Not_Valid @@ -1137,7 +1020,6 @@ Exit For ElseIf IsAttribute(buf(i)) Then Dim a As New EmulatorScreen.FieldAttribute(buf(i), Me.Screen.DefaultForeColor, Screen.BackColor) - Logger.Trace(vbTab & "Attribute: " & a.Attribute.ToString) start += 1 If i > error_text_start Then Got_Trailing_Attribute = True @@ -1156,8 +1038,6 @@ Screen.ErrorText = ErrorText RaiseEvent ErrorTextChanged() - Logger.Trace(vbTab & "Error: " & ErrorText) - Logger.Trace(vbTab & "----------") Case Command.READ_SCREEN If (Me.Keyboard.State = EmulatorKeyboard.Keyboard_State.SS_Message) Or @@ -1194,15 +1074,10 @@ Reply.WriteByte(Command.RESTORE_PARTIAL_SCREEN) 'XXX SAVE_PARTIAL_SCREEN should save the screen data and queue it to be sent to the AS400 after processing the rest of the data stream. Dim Flag As Byte = buf(start) - Logger.Trace(vbTab & "Flag: " & Flag.ToString) Dim TopRow As Byte = buf(start + 1) - Logger.Trace(vbTab & "TopRow: " & TopRow.ToString) Dim LeftColumn As Byte = buf(start + 2) - Logger.Trace(vbTab & "LeftColumn: " & LeftColumn.ToString) Dim WindowDepth As Byte = buf(start + 3) - Logger.Trace(vbTab & "WindowDepth: " & WindowDepth.ToString) Dim WindowWidth As Byte = buf(start + 4) - Logger.Trace(vbTab & "WindowWidth: " & WindowWidth.ToString) start += 5 End Select @@ -1287,7 +1162,6 @@ Return False End If Case Command.UNDOCUMENTED_1 - Logger.Trace(vbTab & "***Undocumented command ignored***") 'XXX All known occurrences of this command have contained no additional bytes, but since it's undocumented, read until the next ESC. Do While (start <= MaxOffs) AndAlso (buf(start) <> Emulator.ESC) start += 1 @@ -1326,7 +1200,6 @@ RaiseEvent DataStreamError(NegativeResponse.Premature_Data_Stream_Termination) Return False Catch ex As Exception - Logger.Error(ex.Message, ex) MsgBox(ex.Message, MsgBoxStyle.Critical, "Error reading Telnet data") Return False Finally diff --git a/ibm5250/Emulator/classLocalization.vb b/ibm5250/Emulator/classLocalization.vb index c823903..56a869d 100644 --- a/ibm5250/Emulator/classLocalization.vb +++ b/ibm5250/Emulator/classLocalization.vb @@ -1,6 +1,5 @@ Partial Class Emulator Public Class Localization - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger Public Locales As SortedList(Of String, Locale) Public Sub New() Locales = New SortedList(Of String, Locale) @@ -25,10 +24,7 @@ Try Locales.Add(loc(0), New Locale(loc(0), System.Text.Encoding.GetEncoding(loc(1)), loc(2), loc(3), loc(4))) Catch ex As Exception - Logger.Warn("Error adding locale definition from '" & fname & "' line " & LineNumber & ": " & ex.Message) End Try - Else - Logger.Warn("Invalid Locale definition in '" & fname & "' line " & LineNumber & ": incorrect number of fields") End If End If End If @@ -36,7 +32,6 @@ Loop End If Catch ex As Exception - Logger.Warn(ex.Message) Finally If sr IsNot Nothing Then sr.Close() End Try diff --git a/ibm5250/IBM5250.vbproj b/ibm5250/IBM5250.vbproj index 735bc8d..bfb8cda 100644 --- a/ibm5250/IBM5250.vbproj +++ b/ibm5250/IBM5250.vbproj @@ -154,10 +154,6 @@ My Settings.Designer.vb - - Designer - - diff --git a/ibm5250/NLog.xsd b/ibm5250/NLog.xsd deleted file mode 100644 index a1ef2d5..0000000 --- a/ibm5250/NLog.xsd +++ /dev/null @@ -1,3531 +0,0 @@ - - - - - - - - - - - - - - - Watch config file for changes and reload automatically. - - - - - Print internal NLog messages to the console. Default value is: false - - - - - Print internal NLog messages to the console error output. Default value is: false - - - - - Write internal NLog messages to the specified file. - - - - - Log level threshold for internal log messages. Default value is: Info. - - - - - Global log level threshold for application log messages. Messages below this level won't be logged. - - - - - Throw an exception when there is an internal error. Default value is: false. Not recommend to set to true in production! - - - - - Throw an exception when there is a configuration error. If not set, determined by throwExceptions. - - - - - Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false. - - - - - Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false. - - - - - Write timestamps for internal NLog messages. Default value is: true. - - - - - Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false. - - - - - Perform message template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty. - - - - - - - - - - - - - - Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes). - - - - - - - - - - - - - - - - - Prefix for targets/layout renderers/filters/conditions loaded from this assembly. - - - - - Load NLog extensions from the specified file (*.dll) - - - - - Load NLog extensions from the specified assembly. Assembly name should be fully qualified. - - - - - - - - - - Name of the logger. May include wildcard characters ('*' or '?'). - - - - - Comma separated list of levels that this rule matches. - - - - - Minimum level that this rule matches. - - - - - Maximum level that this rule matches. - - - - - Level that this rule matches. - - - - - Comma separated list of target names. - - - - - Ignore further rules if this one matches. - - - - - Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName. - - - - - - - - - - - - - - - Default action if none of the filters match. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file. - - - - - Ignore any errors in the include file. - - - - - - - - Variable value. Note, the 'value' attribute has precedence over this one. - - - - - - Variable name. - - - - - Variable value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events that should be processed in a batch by the lazy writer thread. - - - - - Whether to use the locking queue, instead of a lock-free concurrent queue The locking queue is less concurrent when many logger threads, but reduces memory allocation - - - - - Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch - - - - - Action to be taken when the lazy writer thread request queue count exceeds the set limit. - - - - - Limit on the number of requests in the lazy writer thread request queue. - - - - - Time in milliseconds to sleep between batches. (1 or less means trigger on new activity) - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Delay the flush until the LogEvent has been confirmed as written - - - - - Condition expression. Log events who meet this condition will cause a flush on the wrapped target. - - - - - Name of the target. - - - - - Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events to be buffered. - - - - - Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. - - - - - Action to take if the buffer overflows. - - - - - Indicates whether to use sliding timeout. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Maximum queue size. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Viewer parameter name. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - Enables output using ANSI Color Codes - - - - - The encoding for writing messages to the . - - - - - Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). - - - - - Indicates whether to use default row highlighting rules. - - - - - Indicates whether to auto-flush after - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Condition that must be met in order to set the specified foreground and background color. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used. - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - The encoding for writing messages to the . - - - - - Indicates whether to send the log messages to the standard error instead of the standard output. - - - - - Indicates whether to auto-flush after - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. - - - - - Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. - - - - - Name of the database provider. - - - - - Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. - - - - - Indicates whether to keep the database connection open between the log events. - - - - - Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. - - - - - Name of the connection string (as specified in <connectionStrings> configuration section. - - - - - Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. - - - - - Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. - - - - - Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Text of the SQL command to be run on each log level. - - - - - Type of the SQL command to be run on each log level. - - - - - - - - - - - - - - - - - - - - - - - Type of the command. - - - - - Connection string to run the command against. If not provided, connection string from the target is used. - - - - - Indicates whether to ignore failures. - - - - - Command text. - - - - - - - - - - - - - - - - - - Database parameter name. - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Database parameter DbType. - - - - - Database parameter size. - - - - - Database parameter precision. - - - - - Database parameter scale. - - - - - Type of the parameter. - - - - - Convert format of the database parameter value . - - - - - Culture used for parsing parameter string-value for type-conversion - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Layout that renders event Category. - - - - - Optional entrytype. When not set, or when not convertible to then determined by - - - - - Layout that renders event ID. - - - - - Name of the Event Log to write to. This can be System, Application or any user-defined name. - - - - - Name of the machine on which Event Log service is running. - - - - - Maximum Event log size in kilobytes. - - - - - Message length limit to write to the Event Log. - - - - - Value to be used as the event Source. - - - - - Action to take if the message is larger than the option. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether to return to the first target after any successful write. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - File encoding. - - - - - Line ending mode. - - - - - Indicates whether to compress archive files into the zip archive format. - - - - - Way file archives are numbered. - - - - - Name of the file to be used for an archive. - - - - - Is the an absolute or relative path? - - - - - Indicates whether to automatically archive log files every time the specified time passes. - - - - - Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: - - - - - Maximum number of archive files that should be kept. - - - - - Indicates whether the footer should be written only when the file is archived. - - - - - Maximum number of log filenames that should be stored as existing. - - - - - Is the an absolute or relative path? - - - - - Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation. - - - - - Indicates whether file creation calls should be synchronized by a system global mutex. - - - - - Indicates whether to replace file contents on each write instead of appending log message at the end. - - - - - Indicates whether to write BOM (byte order mark) in created files - - - - - Indicates whether to enable log file(s) to be deleted. - - - - - Name of the file to write to. - - - - - Value specifying the date format to use when archiving files. - - - - - Indicates whether to archive old log file on startup. - - - - - Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong. - - - - - Indicates whether to create directories if they do not exist. - - - - - Indicates whether to delete old log file on startup. - - - - - File attributes (Windows only). - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates whether concurrent writes to the log file by multiple processes on different network hosts. - - - - - Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. - - - - - Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). - - - - - Indicates whether to keep log file open instead of opening and closing it on each logging event. - - - - - Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write - - - - - Indicates whether concurrent writes to the log file by multiple processes on the same host. - - - - - Number of times the write is appended on the file before NLog discards the log message. - - - - - Delay in milliseconds to wait before attempting to write to the file again. - - - - - Log file buffer size in bytes. - - - - - Maximum number of seconds before open files are flushed. If this number is negative or zero the files are not flushed by timer. - - - - - Indicates whether to automatically flush the file buffers after each log message. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Condition expression. Log events who meet this condition will be forwarded to the wrapped target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Windows domain name to change context to. - - - - - Required impersonation level. - - - - - Type of the logon provider. - - - - - Logon Type. - - - - - User account password. - - - - - Indicates whether to revert to the credentials of the process instead of impersonating another user. - - - - - Username to change context to. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Interval in which messages will be written up to the number of messages. - - - - - Maximum allowed number of messages written per . - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Endpoint address. - - - - - Name of the endpoint configuration in WCF configuration file. - - - - - Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply) - - - - - Client ID. - - - - - Indicates whether to include per-event properties in the payload sent to the server. - - - - - Indicates whether to use binary message encoding. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Name of the parameter. - - - - - Type of the parameter. - - - - - Type of the parameter. Obsolete alias for - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether NewLine characters in the body should be replaced with tags. - - - - - Priority used for sending mails. - - - - - Encoding to be used for sending e-mail. - - - - - BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Indicates whether to add new lines between log entries. - - - - - Indicates whether to send message as HTML instead of plain text. - - - - - Sender's email address (e.g. joe@domain.com). - - - - - Mail message body (repeated for each log message send in one mail). - - - - - Mail subject. - - - - - Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates the SMTP client timeout. - - - - - SMTP Server to be used for sending. - - - - - SMTP Authentication mode. - - - - - Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. - - - - - Port number that SMTP Server is listening on. - - - - - Indicates whether the default Settings from System.Net.MailSettings should be used. - - - - - Folder where applications save mail messages to be processed by the local SMTP server. - - - - - Specifies how outgoing email messages will be handled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Max number of items to have in memory - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Class name. - - - - - Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Encoding to be used. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Maximum queue size. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Maximum queue size. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Indicates whether to perform layout calculation. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether performance counter should be automatically created. - - - - - Name of the performance counter category. - - - - - Counter help text. - - - - - Name of the performance counter. - - - - - Performance counter type. - - - - - The value by which to increment the counter. - - - - - Performance counter instance name. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Default filter to be applied when no specific rule matches. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - Condition to be tested. - - - - - Resulting filter to be applied when the condition matches. - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of times to repeat each log message. - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of retries that should be attempted on the wrapped target in case of a failure. - - - - - Time to wait between retries in milliseconds. - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Always use independent of - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8. - - - - - Web service method name. Only used with Soap. - - - - - Web service namespace. Only used with Soap. - - - - - Protocol to be used when calling web service. - - - - - Custom proxy address, include port separated by a colon - - - - - Encoding. - - - - - Web service URL. - - - - - Value whether escaping be done according to the old NLog style (Very non-standard) - - - - - Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs) - - - - - Indicates whether to pre-authenticate the HttpWebRequest (Requires 'Authorization' in parameters) - - - - - Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see and ). - - - - - (optional) root namespace of the XML document, if POST of XML document chosen. (see and ). - - - - - Proxy configuration when calling web service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). - - - - - Column delimiter. - - - - - Quote Character. - - - - - Quoting mode. - - - - - Indicates whether CVS should include header. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout of the column. - - - - - Name of the column. - - - - - Override of Quoting mode - - - - - - - - - - - - - - - - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as JSON) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the JSON serializer follow object references before backing off - - - - - Option to render the empty object value {} - - - - - Option to suppress the extra spaces in the output json - - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Json encoded. - - - - - Indicates whether to escape non-ascii characters - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - - - - - - - - - - - - - - - - - Option to include all properties from the log events - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - - - - - - - - - - Layout text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - Name of the root XML element - - - - - Value inside the root XML element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Name of the element - - - - - Value inside the element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Condition expression. - - - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Default number of unique filter values to expect, will automatically increase if needed - - - - - Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout. - - - - - Layout to be used to filter log messages. - - - - - Max number of unique filter values to expect simultaneously - - - - - Max length of filter values, will truncate if above limit - - - - - How long before a filter expires, and logging is accepted again - - - - - Default buffer size for the internal buffers - - - - - Reuse internal buffers, and doesn't have to constantly allocate new buffers - - - - - Append FilterCount to the when an event is no longer filtered - - - - - Insert FilterCount value into when an event is no longer filtered - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ibm5250/packages.config b/ibm5250/packages.config deleted file mode 100644 index 33fb1e1..0000000 --- a/ibm5250/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ibmiclient/IBMiClient/IBMiClient.vbproj b/ibmiclient/IBMiClient/IBMiClient.vbproj index 4690480..9f96ff3 100644 --- a/ibmiclient/IBMiClient/IBMiClient.vbproj +++ b/ibmiclient/IBMiClient/IBMiClient.vbproj @@ -135,10 +135,6 @@ My Settings.Designer.vb - - Designer - - diff --git a/ibmiclient/IBMiClient/NLog.xsd b/ibmiclient/IBMiClient/NLog.xsd deleted file mode 100644 index a1ef2d5..0000000 --- a/ibmiclient/IBMiClient/NLog.xsd +++ /dev/null @@ -1,3531 +0,0 @@ - - - - - - - - - - - - - - - Watch config file for changes and reload automatically. - - - - - Print internal NLog messages to the console. Default value is: false - - - - - Print internal NLog messages to the console error output. Default value is: false - - - - - Write internal NLog messages to the specified file. - - - - - Log level threshold for internal log messages. Default value is: Info. - - - - - Global log level threshold for application log messages. Messages below this level won't be logged. - - - - - Throw an exception when there is an internal error. Default value is: false. Not recommend to set to true in production! - - - - - Throw an exception when there is a configuration error. If not set, determined by throwExceptions. - - - - - Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false. - - - - - Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false. - - - - - Write timestamps for internal NLog messages. Default value is: true. - - - - - Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false. - - - - - Perform message template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty. - - - - - - - - - - - - - - Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes). - - - - - - - - - - - - - - - - - Prefix for targets/layout renderers/filters/conditions loaded from this assembly. - - - - - Load NLog extensions from the specified file (*.dll) - - - - - Load NLog extensions from the specified assembly. Assembly name should be fully qualified. - - - - - - - - - - Name of the logger. May include wildcard characters ('*' or '?'). - - - - - Comma separated list of levels that this rule matches. - - - - - Minimum level that this rule matches. - - - - - Maximum level that this rule matches. - - - - - Level that this rule matches. - - - - - Comma separated list of target names. - - - - - Ignore further rules if this one matches. - - - - - Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName. - - - - - - - - - - - - - - - Default action if none of the filters match. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file. - - - - - Ignore any errors in the include file. - - - - - - - - Variable value. Note, the 'value' attribute has precedence over this one. - - - - - - Variable name. - - - - - Variable value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events that should be processed in a batch by the lazy writer thread. - - - - - Whether to use the locking queue, instead of a lock-free concurrent queue The locking queue is less concurrent when many logger threads, but reduces memory allocation - - - - - Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch - - - - - Action to be taken when the lazy writer thread request queue count exceeds the set limit. - - - - - Limit on the number of requests in the lazy writer thread request queue. - - - - - Time in milliseconds to sleep between batches. (1 or less means trigger on new activity) - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Delay the flush until the LogEvent has been confirmed as written - - - - - Condition expression. Log events who meet this condition will cause a flush on the wrapped target. - - - - - Name of the target. - - - - - Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events to be buffered. - - - - - Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. - - - - - Action to take if the buffer overflows. - - - - - Indicates whether to use sliding timeout. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Maximum queue size. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Viewer parameter name. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - Enables output using ANSI Color Codes - - - - - The encoding for writing messages to the . - - - - - Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). - - - - - Indicates whether to use default row highlighting rules. - - - - - Indicates whether to auto-flush after - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Condition that must be met in order to set the specified foreground and background color. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used. - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - The encoding for writing messages to the . - - - - - Indicates whether to send the log messages to the standard error instead of the standard output. - - - - - Indicates whether to auto-flush after - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. - - - - - Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. - - - - - Name of the database provider. - - - - - Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. - - - - - Indicates whether to keep the database connection open between the log events. - - - - - Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. - - - - - Name of the connection string (as specified in <connectionStrings> configuration section. - - - - - Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. - - - - - Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. - - - - - Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Text of the SQL command to be run on each log level. - - - - - Type of the SQL command to be run on each log level. - - - - - - - - - - - - - - - - - - - - - - - Type of the command. - - - - - Connection string to run the command against. If not provided, connection string from the target is used. - - - - - Indicates whether to ignore failures. - - - - - Command text. - - - - - - - - - - - - - - - - - - Database parameter name. - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Database parameter DbType. - - - - - Database parameter size. - - - - - Database parameter precision. - - - - - Database parameter scale. - - - - - Type of the parameter. - - - - - Convert format of the database parameter value . - - - - - Culture used for parsing parameter string-value for type-conversion - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Layout that renders event Category. - - - - - Optional entrytype. When not set, or when not convertible to then determined by - - - - - Layout that renders event ID. - - - - - Name of the Event Log to write to. This can be System, Application or any user-defined name. - - - - - Name of the machine on which Event Log service is running. - - - - - Maximum Event log size in kilobytes. - - - - - Message length limit to write to the Event Log. - - - - - Value to be used as the event Source. - - - - - Action to take if the message is larger than the option. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether to return to the first target after any successful write. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - File encoding. - - - - - Line ending mode. - - - - - Indicates whether to compress archive files into the zip archive format. - - - - - Way file archives are numbered. - - - - - Name of the file to be used for an archive. - - - - - Is the an absolute or relative path? - - - - - Indicates whether to automatically archive log files every time the specified time passes. - - - - - Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: - - - - - Maximum number of archive files that should be kept. - - - - - Indicates whether the footer should be written only when the file is archived. - - - - - Maximum number of log filenames that should be stored as existing. - - - - - Is the an absolute or relative path? - - - - - Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation. - - - - - Indicates whether file creation calls should be synchronized by a system global mutex. - - - - - Indicates whether to replace file contents on each write instead of appending log message at the end. - - - - - Indicates whether to write BOM (byte order mark) in created files - - - - - Indicates whether to enable log file(s) to be deleted. - - - - - Name of the file to write to. - - - - - Value specifying the date format to use when archiving files. - - - - - Indicates whether to archive old log file on startup. - - - - - Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong. - - - - - Indicates whether to create directories if they do not exist. - - - - - Indicates whether to delete old log file on startup. - - - - - File attributes (Windows only). - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates whether concurrent writes to the log file by multiple processes on different network hosts. - - - - - Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. - - - - - Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). - - - - - Indicates whether to keep log file open instead of opening and closing it on each logging event. - - - - - Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write - - - - - Indicates whether concurrent writes to the log file by multiple processes on the same host. - - - - - Number of times the write is appended on the file before NLog discards the log message. - - - - - Delay in milliseconds to wait before attempting to write to the file again. - - - - - Log file buffer size in bytes. - - - - - Maximum number of seconds before open files are flushed. If this number is negative or zero the files are not flushed by timer. - - - - - Indicates whether to automatically flush the file buffers after each log message. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Condition expression. Log events who meet this condition will be forwarded to the wrapped target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Windows domain name to change context to. - - - - - Required impersonation level. - - - - - Type of the logon provider. - - - - - Logon Type. - - - - - User account password. - - - - - Indicates whether to revert to the credentials of the process instead of impersonating another user. - - - - - Username to change context to. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Interval in which messages will be written up to the number of messages. - - - - - Maximum allowed number of messages written per . - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Endpoint address. - - - - - Name of the endpoint configuration in WCF configuration file. - - - - - Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply) - - - - - Client ID. - - - - - Indicates whether to include per-event properties in the payload sent to the server. - - - - - Indicates whether to use binary message encoding. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Name of the parameter. - - - - - Type of the parameter. - - - - - Type of the parameter. Obsolete alias for - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether NewLine characters in the body should be replaced with tags. - - - - - Priority used for sending mails. - - - - - Encoding to be used for sending e-mail. - - - - - BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Indicates whether to add new lines between log entries. - - - - - Indicates whether to send message as HTML instead of plain text. - - - - - Sender's email address (e.g. joe@domain.com). - - - - - Mail message body (repeated for each log message send in one mail). - - - - - Mail subject. - - - - - Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates the SMTP client timeout. - - - - - SMTP Server to be used for sending. - - - - - SMTP Authentication mode. - - - - - Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. - - - - - Port number that SMTP Server is listening on. - - - - - Indicates whether the default Settings from System.Net.MailSettings should be used. - - - - - Folder where applications save mail messages to be processed by the local SMTP server. - - - - - Specifies how outgoing email messages will be handled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Max number of items to have in memory - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Class name. - - - - - Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Encoding to be used. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Maximum queue size. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Maximum queue size. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Indicates whether to perform layout calculation. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether performance counter should be automatically created. - - - - - Name of the performance counter category. - - - - - Counter help text. - - - - - Name of the performance counter. - - - - - Performance counter type. - - - - - The value by which to increment the counter. - - - - - Performance counter instance name. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Default filter to be applied when no specific rule matches. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - Condition to be tested. - - - - - Resulting filter to be applied when the condition matches. - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of times to repeat each log message. - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of retries that should be attempted on the wrapped target in case of a failure. - - - - - Time to wait between retries in milliseconds. - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Always use independent of - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8. - - - - - Web service method name. Only used with Soap. - - - - - Web service namespace. Only used with Soap. - - - - - Protocol to be used when calling web service. - - - - - Custom proxy address, include port separated by a colon - - - - - Encoding. - - - - - Web service URL. - - - - - Value whether escaping be done according to the old NLog style (Very non-standard) - - - - - Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs) - - - - - Indicates whether to pre-authenticate the HttpWebRequest (Requires 'Authorization' in parameters) - - - - - Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see and ). - - - - - (optional) root namespace of the XML document, if POST of XML document chosen. (see and ). - - - - - Proxy configuration when calling web service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). - - - - - Column delimiter. - - - - - Quote Character. - - - - - Quoting mode. - - - - - Indicates whether CVS should include header. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout of the column. - - - - - Name of the column. - - - - - Override of Quoting mode - - - - - - - - - - - - - - - - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as JSON) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the JSON serializer follow object references before backing off - - - - - Option to render the empty object value {} - - - - - Option to suppress the extra spaces in the output json - - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Json encoded. - - - - - Indicates whether to escape non-ascii characters - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - - - - - - - - - - - - - - - - - Option to include all properties from the log events - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - - - - - - - - - - Layout text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - Name of the root XML element - - - - - Value inside the root XML element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Name of the element - - - - - Value inside the element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Condition expression. - - - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Default number of unique filter values to expect, will automatically increase if needed - - - - - Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout. - - - - - Layout to be used to filter log messages. - - - - - Max number of unique filter values to expect simultaneously - - - - - Max length of filter values, will truncate if above limit - - - - - How long before a filter expires, and logging is accepted again - - - - - Default buffer size for the internal buffers - - - - - Reuse internal buffers, and doesn't have to constantly allocate new buffers - - - - - Append FilterCount to the when an event is no longer filtered - - - - - Insert FilterCount value into when an event is no longer filtered - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ibmiclient/IBMiClient/Signon/classMessageHeader.vb b/ibmiclient/IBMiClient/Signon/classMessageHeader.vb index 842ce1e..d00f696 100644 --- a/ibmiclient/IBMiClient/Signon/classMessageHeader.vb +++ b/ibmiclient/IBMiClient/Signon/classMessageHeader.vb @@ -28,10 +28,7 @@ Partial Public Class Client Public RequestReplyID As MessageType Public Shared HeaderLength As Integer = 20 - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(HeaderBytes() As Byte) - Logger.Trace("") If HeaderBytes.Length <> HeaderLength Then Throw New ArgumentException("Incorrect number of bytes to interpret as a message header") Dim Data As New System.IO.MemoryStream(HeaderBytes) Me.MessageLength = ReadUInt32(Data) @@ -48,7 +45,6 @@ Partial Public Class Client End Sub Friend Sub New(MsgType As MessageType) - Logger.Trace("") Me.MessageLength = 0 Me.HeaderID = 0 Me.ServerID = &HE009 'XXX what does this mean? @@ -72,7 +68,6 @@ Partial Public Class Client End Sub Public Function ToBytes() As Byte() - Logger.Trace("") Dim Data As New System.IO.MemoryStream Dim b() As Byte = ToBigEndianBytes(Me.MessageLength) Data.Write(b, 0, b.Length) diff --git a/ibmiclient/IBMiClient/Signon/classSignon.vb b/ibmiclient/IBMiClient/Signon/classSignon.vb index fd2ca9d..4989e6a 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon.vb @@ -85,10 +85,7 @@ Partial Public Class Client Private Port_ As Integer Private ClientSeed_(7) As Byte 'Most recently used client seed - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(Host As String, Port As Integer, UseSSL As Boolean) - Logger.Trace("Host='" & Host & "', Port='" & Port.ToString & "'") If String.IsNullOrWhiteSpace(Host) Then Throw New ArgumentException("Host cannot be null") If Port < 1 Then Throw New Exception("The Port parameter is not valid") Host_ = Host @@ -140,7 +137,6 @@ Partial Public Class Client Return Connect(Host_, Port_, TimeoutMS) End Function Private Function Connect(Host As String, Port As Integer, TimeoutMS As Integer) As Boolean - Logger.Trace("") If String.IsNullOrWhiteSpace(Host) Then Throw New ArgumentException("Host cannot be null") If Port_ < 1 Then Throw New Exception("The Port parameter is not valid") Try @@ -155,19 +151,16 @@ Partial Public Class Client If UseSSL_ Then CertActionDone.WaitOne() 'Wait for SSL negotiation to complete. We may be waiting for the user to accept the remote certificate, so don't time out. ConnectDone.WaitOne() 'Wait for ConnectCallback to complete. If ConnectException IsNot Nothing Then Throw ConnectException - Logger.Debug("Success") Return True Else Throw New Exception("Failed to connect to host '" & Host & "' on port " & Port.ToString) End If Catch ex As Exception - Logger.Error(ex) Try tc.Close() Catch exx As ObjectDisposedException 'Do nothing; this happens after we've already disconnected. Catch exx As Exception - Logger.Error(exx) End Try Throw End Try @@ -175,7 +168,6 @@ Partial Public Class Client End Function Private Sub ConnectCallback(ByVal ar As IAsyncResult) - Logger.Trace("") Try ' Complete the connection. tc.EndConnect(ar) @@ -189,7 +181,6 @@ Partial Public Class Client End If ConnectDone.Set() 'Signal that the connection attempt has completed. Catch ex As Exception - Logger.Error(ex) ConnectException = ex CertActionDone.Set() 'Signal that SSL authentication has completed so we don't wait forever. ConnectDone.Set() 'Signal that the connection attempt has completed. Don't move this to a Finally block or Disconnect() will hang waiting for the signal. @@ -198,9 +189,8 @@ Partial Public Class Client End Sub Private Function ServerCertificateValidationCallback(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As SslPolicyErrors) As Boolean - Logger.Trace("") Try - If sslPolicyErrors = sslPolicyErrors.None Then + If sslPolicyErrors = SslPolicyErrors.None Then Return True Else Dim Store As New X509Store(StoreName.TrustedPeople, StoreLocation.CurrentUser) @@ -213,9 +203,9 @@ Partial Public Class Client 'We didn't find the cert in the store, so prompt the user. Dim Reasons As New List(Of String) - If sslPolicyErrors And sslPolicyErrors.RemoteCertificateNotAvailable Then Reasons.Add("Remote certificate not available") - If sslPolicyErrors And sslPolicyErrors.RemoteCertificateNameMismatch Then Reasons.Add("Remote certificate name mismatch") - If sslPolicyErrors And sslPolicyErrors.RemoteCertificateChainErrors Then Reasons.Add("Remote certificate chain errors") + If sslPolicyErrors And SslPolicyErrors.RemoteCertificateNotAvailable Then Reasons.Add("Remote certificate not available") + If sslPolicyErrors And SslPolicyErrors.RemoteCertificateNameMismatch Then Reasons.Add("Remote certificate name mismatch") + If sslPolicyErrors And SslPolicyErrors.RemoteCertificateChainErrors Then Reasons.Add("Remote certificate chain errors") Dim tmpDate As Date If Date.TryParse(certificate.GetEffectiveDateString, tmpDate) Then If tmpDate > Now Then Reasons.Add("Remote certificate is not yet valid") @@ -263,7 +253,6 @@ Partial Public Class Client End If End If Catch ex As Exception - Logger.Error(ex) Return False Finally CertActionDone.Set() @@ -271,7 +260,6 @@ Partial Public Class Client End Function Private Sub SayGoodBye() - Logger.Trace("") If tc IsNot Nothing Then Dim Bye As New MessageHeader(MessageType.EndServerRequest) Dim b() As Byte = Bye.ToBytes @@ -280,25 +268,17 @@ Partial Public Class Client End Sub Private Sub Disconnect() - Logger.Trace("") Try If tc IsNot Nothing Then tc.Close() Catch ex As Exception - Logger.Error(ex) End Try End Sub Public Function Get_Server_Attributes(TimeoutMS As Integer) As ServerInfo - Logger.Trace("") Connect(TimeoutMS) Dim AttributeReply As Signon.Exchange_Attribute_Reply = Get_Server_AttributesX(TimeoutMS) SayGoodBye() Disconnect() - Logger.Debug("Server Version: V" & AttributeReply.ServerVersion_Version.ToString & "R" & AttributeReply.ServerVersion_Release.ToString & "M" & AttributeReply.ServerVersion_Modification.ToString) - Logger.Debug("Server Level: " & AttributeReply.ServerLevel) - Logger.Debug("Server Seed: " & BitConverter.ToString(AttributeReply.ServerSeed)) - Logger.Debug("Password Level: " & AttributeReply.PasswordLevel) - Logger.Debug("Job Name: " & AttributeReply.JobName.Trim) Dim Result As New ServerInfo Result.Host = Me.Host_ Result.Version = AttributeReply.ServerVersion_Version @@ -312,12 +292,10 @@ Partial Public Class Client End Function Private Function Get_Server_AttributesX(TimeoutMS As Integer) As Signon.Exchange_Attribute_Reply - Logger.Trace("") Dim MsgHeader As New Signon.MessageHeader(MessageType.ExchangeAttributeRequest) Dim AttributeRequest As New Signon.Exchange_Attribute_Request(MsgHeader) Array.Copy(AttributeRequest.ClientSeed, ClientSeed_, ClientSeed_.Length) Dim b() As Byte = AttributeRequest.ToBytes - Logger.Debug("Request: " & BitConverter.ToString(b)) stream.Write(b, 0, b.Length) Dim o As Object = GetReply(TimeoutMS) @@ -338,13 +316,6 @@ Partial Public Class Client Dim InfoReply As Signon.Info_Reply = Get_Signon_InfoX(UserName, Password, TimeoutMS) SayGoodBye() Disconnect() - Logger.Debug("ResultCode: " & InfoReply.ResultCode.ToString) - Logger.Debug("ResultText: " & InfoReply.ResultText) - Logger.Debug("CurrentSignonDate: " & InfoReply.CurrentSignonDate.ToString) - Logger.Debug("LastSignonDate: " & InfoReply.LastSignonDate.ToString) - Logger.Debug("ExpirationDate: " & InfoReply.ExpirationDate.ToString) - Logger.Debug("ExpirationWarning: " & InfoReply.ExpirationWarning.ToString) - Logger.Debug("ServerCCSID: " & InfoReply.ServerCCSID.ToString) Dim Result As New SignonInfo Result.Code = InfoReply.ResultCode Result.Text = InfoReply.ResultText @@ -355,15 +326,6 @@ Partial Public Class Client 'XXX more props here? Result.Messages = New List(Of SignonInfoMessage) For Each Msg As Signon.Info_Message In InfoReply.Messages - Logger.Debug(" -Message-") - Logger.Debug(" Severity: " & Msg.Severity.ToString) - Logger.Debug(" ReasonCode: " & Msg.ReasonCode) - Logger.Debug(" ReasonText: " & Msg.ReasonText) - Logger.Debug(" FileName: " & Msg.FileName) - Logger.Debug(" LibraryName: " & Msg.LibraryName) - Logger.Debug(" Text: " & Msg.Text) - Logger.Debug(" Help: " & Msg.Help) - Logger.Debug("") Dim ResultMessage As New SignonInfoMessage ResultMessage.Severity = CInt(Msg.Severity) ResultMessage.ReasonCode = Msg.ReasonCode @@ -378,13 +340,11 @@ Partial Public Class Client End Function Private Function Get_Signon_InfoX(UserName As String, Password As String, TimeoutMS As Integer) As Signon.Info_Reply - Logger.Trace("") Dim AttributeReply As Signon.Exchange_Attribute_Reply = Get_Server_AttributesX(TimeoutMS) Dim MsgHeader As New Signon.MessageHeader(MessageType.InfoRequest) Dim InfoReq As New Signon.Info_Request(MsgHeader, ClientSeed_, AttributeReply.ServerSeed, UserName, Password, AttributeReply.PasswordLevel, AttributeReply.ServerLevel) Dim b() As Byte = InfoReq.ToBytes - Logger.Debug("Request: " & BitConverter.ToString(b)) stream.Write(b, 0, b.Length) Dim o As Object = GetReply(TimeoutMS) @@ -397,28 +357,16 @@ Partial Public Class Client End Function Public Function Change_Password(UserName As String, Password As String, NewPassword As String, TimeoutMS As Integer) As ChangePasswordInfo - Logger.Trace("") Connect(TimeoutMS) Dim ChangePasswordReply As Signon.Change_Password_Reply = Change_PasswordX(UserName, Password, NewPassword, TimeoutMS) SayGoodBye() Disconnect() - Logger.Debug("ResultCode: " & ChangePasswordReply.ResultCode.ToString) - Logger.Debug("ResultText: " & ChangePasswordReply.ResultText) 'XXX more props here? Dim Result As New ChangePasswordInfo Result.Code = ChangePasswordReply.ResultCode Result.Text = ChangePasswordReply.ResultText Result.Messages = New List(Of SignonInfoMessage) For Each Msg As Signon.Info_Message In ChangePasswordReply.Messages - Logger.Debug(" -Message-") - Logger.Debug(" Severity: " & Msg.Severity.ToString) - Logger.Debug(" ReasonCode: " & Msg.ReasonCode) - Logger.Debug(" ReasonText: " & Msg.ReasonText) - Logger.Debug(" FileName: " & Msg.FileName) - Logger.Debug(" LibraryName: " & Msg.LibraryName) - Logger.Debug(" Text: " & Msg.Text) - Logger.Debug(" Help: " & Msg.Help) - Logger.Debug("") Dim InfoMsg As New SignonInfoMessage InfoMsg.Severity = Msg.Severity InfoMsg.ReasonCode = Msg.ReasonCode @@ -433,13 +381,11 @@ Partial Public Class Client End Function Private Function Change_PasswordX(UserName As String, Password As String, NewPassword As String, TimeoutMS As Integer) As Signon.Change_Password_Reply - Logger.Trace("") Dim AttributeReply As Signon.Exchange_Attribute_Reply = Get_Server_AttributesX(TimeoutMS) Dim MsgHeader As New Signon.MessageHeader(MessageType.ChangePasswordRequest) Dim ChangePasswordRequest As New Signon.Change_Password_Request(MsgHeader, ClientSeed_, AttributeReply.ServerSeed, UserName, Password, NewPassword, AttributeReply.PasswordLevel, AttributeReply.ServerLevel) Dim b() As Byte = ChangePasswordRequest.ToBytes - Logger.Debug("Request: " & BitConverter.ToString(b)) stream.Write(b, 0, b.Length) Dim o As Object = GetReply(TimeoutMS) @@ -452,7 +398,6 @@ Partial Public Class Client End Function Private Function GetReply(TimeoutMS As Integer) As Object - Logger.Trace("") Try Dim b() As Byte b = ReadTCPBytes(stream, MessageHeader.HeaderLength, TimeoutMS) @@ -469,13 +414,11 @@ Partial Public Class Client Throw New Exception("Unimplemented Reply type: " & Header.RequestReplyID.ToString) End Select Catch ex As Exception - Logger.Error(ex) End Try Return Nothing End Function Private Function ReadTCPBytes(ByRef s As System.IO.Stream, ByVal ExpectedBytes As Integer, ByVal TimeoutMS As Integer) As Byte() - Logger.Trace("ExpectedBytes='" & ExpectedBytes.ToString & "'") If Not s.CanRead Then Throw New Exception("Supplied stream is not readable") Dim start As Date = Now Dim BytesRead As Integer = 0 @@ -485,7 +428,6 @@ Partial Public Class Client If BytesRead >= ExpectedBytes Then Exit Do Threading.Thread.CurrentThread.Join(100) Loop - Logger.Debug("Expected bytes=" & ExpectedBytes.ToString & ", Actual bytes=" & BytesRead.ToString) If BytesRead < ExpectedBytes Then Throw New Exception("Insufficient data received from the server") Return b End Function diff --git a/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Reply.vb b/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Reply.vb index 7df8178..9259ee0 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Reply.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Reply.vb @@ -26,10 +26,7 @@ Partial Public Class Client 'Derived fields Friend ResultText As String - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(ByVal MsgHeader As MessageHeader, ByVal DataBytes() As Byte) - Logger.Trace("") If MsgHeader.RequestReplyID <> MessageType.ChangePasswordReply Then Throw New ArgumentException("The supplied header is not the correct message type") Me.Header = MsgHeader If DataBytes.Length < 4 Then Throw New ArgumentException("The supplied data buffer is too short to contain a result code") @@ -65,7 +62,6 @@ Partial Public Class Client 'Case CodePoints.ServerCCSID ' Me.ServerCCSID = ReadUInt32(Data) Case Else - Logger.Debug("Unexpected codepoint: " & CodePoint.ToString) 'Read the rest of the record and throw it away Dim b(RecLen - 6 - 1) As Byte Data.Read(b, 0, b.Length) diff --git a/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Request.vb b/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Request.vb index 52feaca..ab70d38 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Request.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon_Change_Password_Request.vb @@ -33,10 +33,7 @@ Public Class Client Private ServerSeed() As Byte Private ClientSeed() As Byte - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(ByVal MsgHeader As MessageHeader, ClientSeed() As Byte, ServerSeed() As Byte, UserName As String, Password As String, NewPassword As String, PasswordLevel As Byte, ServerLevel As UInt16) - Logger.Trace("") If MsgHeader.RequestReplyID <> MessageType.ChangePasswordRequest Then Throw New ArgumentException("The supplied header is not the correct message type") Me.Header = MsgHeader Me.UserID = UserName.ToUpper @@ -68,7 +65,6 @@ Public Class Client End Sub Public Function ToBytes() As Byte() - Logger.Trace("") Dim Data As New System.IO.MemoryStream Dim b() As Byte = Me.Header.ToBytes() Data.Write(b, 0, b.Length) diff --git a/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Reply.vb b/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Reply.vb index c82ade1..e106b67 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Reply.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Reply.vb @@ -32,17 +32,13 @@ Partial Public Class Client Public ServerVersion_Release As Integer Public ServerVersion_Modification As Integer - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(ByVal MsgHeader As MessageHeader, ByVal DataBytes() As Byte) - Logger.Trace("") If MsgHeader.RequestReplyID <> MessageType.ExchangeAttributeReply Then Throw New ArgumentException("The supplied header is not the correct message type") Me.Header = MsgHeader If DataBytes.Length < 4 Then Throw New ArgumentException("The supplied data buffer is too short to contain a result code") Dim Data As New System.IO.MemoryStream(DataBytes) Me.ResultCode = ReadUInt32(Data) If Me.ResultCode <> 0 Then - Logger.Debug("!!! Non-zero result code: " & Me.ResultCode.ToString) 'XXX End If Do While Data.Position < Data.Length - 5 'make sure we can get at least the length Dim RecLen As Integer = ReadUInt32(Data) @@ -71,7 +67,6 @@ Partial Public Class Client Me.JobName = System.Text.Encoding.UTF8.GetString(b) Me.JobName = Me.JobName.Replace(Chr(0), " ").Trim Case Else - Logger.Debug("Unexpected codepoint: " & CodePoint.ToString) 'Read the rest of the record and throw it away Dim b(RecLen - 6 - 1) As Byte Data.Read(b, 0, b.Length) diff --git a/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Request.vb b/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Request.vb index c6b47fd..e3c84d2 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Request.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon_Exchange_Attribute_Request.vb @@ -24,8 +24,6 @@ Partial Public Class Client Friend ClientLevel As UInt16 Friend ClientSeed(7) As Byte - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(ByVal MsgHeader As MessageHeader) Me.New(MsgHeader, Encryption.RandomSeed) End Sub @@ -35,7 +33,6 @@ Partial Public Class Client End Sub Public Sub New(ByVal MsgHeader As MessageHeader, ByVal ClientVersion As UInt32, ByVal ClientLevel As UInt16, ByVal ClientSeed() As Byte) - Logger.Trace("") If ClientSeed.Length <> 8 Then Throw New ArgumentException("ClientSeed must be an array of 8 bytes") If MsgHeader.RequestReplyID <> MessageType.ExchangeAttributeRequest Then Throw New ArgumentException("The supplied header is not the correct message type") Me.Header = MsgHeader @@ -45,7 +42,6 @@ Partial Public Class Client End Sub Public Function ToBytes() As Byte() - Logger.Trace("") Dim Data As New System.IO.MemoryStream Dim b() As Byte = Me.Header.ToBytes() Data.Write(b, 0, b.Length) diff --git a/ibmiclient/IBMiClient/Signon/classSignon_Info_Message.vb b/ibmiclient/IBMiClient/Signon/classSignon_Info_Message.vb index 0de2ab7..9f36423 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon_Info_Message.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon_Info_Message.vb @@ -34,16 +34,12 @@ Partial Public Class Client Friend ReasonCode As UInt32 'SubstitionData seems to contain the Reason Code for a failed logon Friend ReasonText As String - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger Public Sub New(ByVal DataBytes() As Byte) - Logger.Trace("") If DataBytes.Length < 15 Then Throw New Exception("Insufficient data to construct a Signon_Info_Message") Dim Data As New System.IO.MemoryStream(DataBytes) Me.TextCCSID = ReadUInt32(Data) - Logger.Debug("TextCCSID: " & Me.TextCCSID.ToString) Me.SubstitutionDataCCSID = ReadUInt32(Data) - Logger.Debug("SubstitutionDataCCSID: " & Me.SubstitutionDataCCSID.ToString) Me.Severity = ReadUInt16(Data) Dim l As UInt32 = ReadUInt32(Data) ReDim Me.MessageType(l - 1) @@ -102,7 +98,6 @@ Partial Public Class Client Me.Help = System.Text.Encoding.UTF8.GetString(b).Trim If Data.Position <> Data.Length Then - Logger.Debug("!!! Some data remains in the buffer after parsing message!") 'XXX should throw here End If End Sub diff --git a/ibmiclient/IBMiClient/Signon/classSignon_Info_Reply.vb b/ibmiclient/IBMiClient/Signon/classSignon_Info_Reply.vb index 3f39be6..8f88333 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon_Info_Reply.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon_Info_Reply.vb @@ -32,10 +32,8 @@ Partial Public Class Client 'Derived fields Friend ResultText As String - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger Public Sub New(ByVal MsgHeader As MessageHeader, ByVal DataBytes() As Byte) - Logger.Trace("") If MsgHeader.RequestReplyID <> MessageType.InfoReply Then Throw New ArgumentException("The supplied header is not the correct message type") Me.Header = MsgHeader If DataBytes.Length < 4 Then Throw New ArgumentException("The supplied data buffer is too short to contain a result code") @@ -79,7 +77,6 @@ Partial Public Class Client Case CodePoints.ServerCCSID Me.ServerCCSID = ReadUInt32(Data) Case Else - Logger.Debug("Unexpected codepoint: " & CodePoint.ToString) 'Read the rest of the record and throw it away Dim b(RecLen - 6 - 1) As Byte Data.Read(b, 0, b.Length) @@ -92,7 +89,6 @@ Partial Public Class Client End Sub Private Function GetDate(ByRef Data As System.IO.MemoryStream) - Logger.Trace("") Dim Year As UInt16 = ReadUInt16(Data) Dim Month As Byte = Data.ReadByte Dim Day As Byte = Data.ReadByte @@ -105,7 +101,6 @@ Partial Public Class Client Try d = New Date(Year, Month, Day, Hour, Minute, Second, New System.Globalization.GregorianCalendar) Catch ex As Exception - Logger.Error(ex, "Error parsing date: " & ex.Message) End Try Return d End Function diff --git a/ibmiclient/IBMiClient/Signon/classSignon_Info_Request.vb b/ibmiclient/IBMiClient/Signon/classSignon_Info_Request.vb index 1cba7f8..fd257eb 100644 --- a/ibmiclient/IBMiClient/Signon/classSignon_Info_Request.vb +++ b/ibmiclient/IBMiClient/Signon/classSignon_Info_Request.vb @@ -26,10 +26,7 @@ Partial Public Class Client Private ServerLevel As UInt16 Private PasswordLevel As Byte - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(ByVal MsgHeader As MessageHeader, ClientSeed() As Byte, ServerSeed() As Byte, UserName As String, Password As String, PasswordLevel As Byte, ServerLevel As UInt16) - Logger.Trace("") If MsgHeader.RequestReplyID <> MessageType.InfoRequest Then Throw New ArgumentException("The supplied header is not the correct message type") Me.Header = MsgHeader Me.UserID = UserName.ToUpper @@ -43,7 +40,6 @@ Partial Public Class Client End Sub Public Function ToBytes() As Byte() - Logger.Trace("") Dim Data As New System.IO.MemoryStream Dim b() As Byte = Me.Header.ToBytes() Data.Write(b, 0, b.Length) diff --git a/ibmiclient/IBMiClient/SvrMap/classSvrmap.vb b/ibmiclient/IBMiClient/SvrMap/classSvrmap.vb index 23e6166..1ac9673 100644 --- a/ibmiclient/IBMiClient/SvrMap/classSvrmap.vb +++ b/ibmiclient/IBMiClient/SvrMap/classSvrmap.vb @@ -24,10 +24,7 @@ Partial Public Class Client Private ConnectException As Exception Private ConnectDone As New System.Threading.ManualResetEvent(False) - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - Public Sub New(Host As String) - Logger.Trace("Host='" & Host & "'") If String.IsNullOrWhiteSpace(Host) Then Throw New ArgumentException("Host cannot be null") Host_ = Host End Sub @@ -37,7 +34,6 @@ Partial Public Class Client Return Connect(Host_, TimeoutMS) End Function Private Function Connect(Host As String, TimeoutMS As Integer) As Boolean - Logger.Trace("Host='" & Host & "'") If String.IsNullOrWhiteSpace(Host) Then Throw New ArgumentException("Host cannot be null") Try ConnectException = Nothing @@ -48,24 +44,20 @@ Partial Public Class Client If Success Then ConnectDone.WaitOne() 'Wait for ConnectCallback to complete. If ConnectException IsNot Nothing Then Throw ConnectException - Logger.Debug("Success") Return True Else Throw New Exception("Failed to connect to host '" & Host & "' on port " & as_svrmap_port.ToString) End If Catch ex As Exception - Logger.Error(ex) End Try Return False End Function Private Sub ConnectCallback(ByVal ar As IAsyncResult) - Logger.Trace("") Try tc.EndConnect(ar) 'Complete the connection. ConnectDone.Set() 'Signal that the connection attempt has completed. Catch ex As Exception - Logger.Error(ex) ConnectException = ex ConnectDone.Set() 'Signal that the connection attempt has completed. Don't move this to a Finally block or Disconnect() will hang waiting for the signal. Disconnect() @@ -73,11 +65,9 @@ Partial Public Class Client End Sub Private Sub Disconnect() - Logger.Trace("") Try If tc IsNot Nothing Then tc.Close() Catch ex As Exception - Logger.Error(ex) End Try End Sub @@ -86,12 +76,10 @@ Partial Public Class Client End Function Private Function ConnectAndGetServicePort(Host As String, ServiceName As String, TimeoutMS As Integer) As Integer - Logger.Trace("Host='" & Host & "', ServiceName='" & ServiceName & "', TimeoutMS=" & TimeoutMS.ToString) Try Disconnect() If Connect(Host, TimeoutMS) Then Return GetServicePortX(ServiceName, TimeoutMS) Catch ex As Exception - Logger.Error(ex) Finally Disconnect() End Try @@ -99,7 +87,6 @@ Partial Public Class Client End Function Private Function GetServicePortX(ServiceName As String, TimeoutMS As Integer) As Integer - Logger.Trace("ServiceName='" & ServiceName & "', TimeoutMS=" & TimeoutMS.ToString) If String.IsNullOrWhiteSpace(ServiceName) Then Throw New ArgumentException("ServiceName cannot be null") Try Dim s As System.Net.Sockets.NetworkStream = tc.GetStream @@ -120,11 +107,9 @@ Partial Public Class Client Dim ms As New System.IO.MemoryStream(b) Dim UnknownByte As Byte = ms.ReadByte() 'result code? =43. Dim ServerPort As UInt32 = ReadUInt32(ms) - Logger.Debug("Success: ServicePort=" & ServerPort.ToString) Return ServerPort End If Catch ex As Exception - Logger.Error(ex) End Try Return 0 End Function diff --git a/ibmiclient/IBMiClient/packages.config b/ibmiclient/IBMiClient/packages.config deleted file mode 100644 index 33fb1e1..0000000 --- a/ibmiclient/IBMiClient/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/telnet/NLog.xsd b/telnet/NLog.xsd deleted file mode 100644 index a1ef2d5..0000000 --- a/telnet/NLog.xsd +++ /dev/null @@ -1,3531 +0,0 @@ - - - - - - - - - - - - - - - Watch config file for changes and reload automatically. - - - - - Print internal NLog messages to the console. Default value is: false - - - - - Print internal NLog messages to the console error output. Default value is: false - - - - - Write internal NLog messages to the specified file. - - - - - Log level threshold for internal log messages. Default value is: Info. - - - - - Global log level threshold for application log messages. Messages below this level won't be logged. - - - - - Throw an exception when there is an internal error. Default value is: false. Not recommend to set to true in production! - - - - - Throw an exception when there is a configuration error. If not set, determined by throwExceptions. - - - - - Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false. - - - - - Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false. - - - - - Write timestamps for internal NLog messages. Default value is: true. - - - - - Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false. - - - - - Perform message template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty. - - - - - - - - - - - - - - Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes). - - - - - - - - - - - - - - - - - Prefix for targets/layout renderers/filters/conditions loaded from this assembly. - - - - - Load NLog extensions from the specified file (*.dll) - - - - - Load NLog extensions from the specified assembly. Assembly name should be fully qualified. - - - - - - - - - - Name of the logger. May include wildcard characters ('*' or '?'). - - - - - Comma separated list of levels that this rule matches. - - - - - Minimum level that this rule matches. - - - - - Maximum level that this rule matches. - - - - - Level that this rule matches. - - - - - Comma separated list of target names. - - - - - Ignore further rules if this one matches. - - - - - Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName. - - - - - - - - - - - - - - - Default action if none of the filters match. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file. - - - - - Ignore any errors in the include file. - - - - - - - - Variable value. Note, the 'value' attribute has precedence over this one. - - - - - - Variable name. - - - - - Variable value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events that should be processed in a batch by the lazy writer thread. - - - - - Whether to use the locking queue, instead of a lock-free concurrent queue The locking queue is less concurrent when many logger threads, but reduces memory allocation - - - - - Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch - - - - - Action to be taken when the lazy writer thread request queue count exceeds the set limit. - - - - - Limit on the number of requests in the lazy writer thread request queue. - - - - - Time in milliseconds to sleep between batches. (1 or less means trigger on new activity) - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Delay the flush until the LogEvent has been confirmed as written - - - - - Condition expression. Log events who meet this condition will cause a flush on the wrapped target. - - - - - Name of the target. - - - - - Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events to be buffered. - - - - - Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. - - - - - Action to take if the buffer overflows. - - - - - Indicates whether to use sliding timeout. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Maximum queue size. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Viewer parameter name. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - Enables output using ANSI Color Codes - - - - - The encoding for writing messages to the . - - - - - Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). - - - - - Indicates whether to use default row highlighting rules. - - - - - Indicates whether to auto-flush after - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Condition that must be met in order to set the specified foreground and background color. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used. - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - The encoding for writing messages to the . - - - - - Indicates whether to send the log messages to the standard error instead of the standard output. - - - - - Indicates whether to auto-flush after - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. - - - - - Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. - - - - - Name of the database provider. - - - - - Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. - - - - - Indicates whether to keep the database connection open between the log events. - - - - - Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. - - - - - Name of the connection string (as specified in <connectionStrings> configuration section. - - - - - Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. - - - - - Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. - - - - - Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Text of the SQL command to be run on each log level. - - - - - Type of the SQL command to be run on each log level. - - - - - - - - - - - - - - - - - - - - - - - Type of the command. - - - - - Connection string to run the command against. If not provided, connection string from the target is used. - - - - - Indicates whether to ignore failures. - - - - - Command text. - - - - - - - - - - - - - - - - - - Database parameter name. - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Database parameter DbType. - - - - - Database parameter size. - - - - - Database parameter precision. - - - - - Database parameter scale. - - - - - Type of the parameter. - - - - - Convert format of the database parameter value . - - - - - Culture used for parsing parameter string-value for type-conversion - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Layout that renders event Category. - - - - - Optional entrytype. When not set, or when not convertible to then determined by - - - - - Layout that renders event ID. - - - - - Name of the Event Log to write to. This can be System, Application or any user-defined name. - - - - - Name of the machine on which Event Log service is running. - - - - - Maximum Event log size in kilobytes. - - - - - Message length limit to write to the Event Log. - - - - - Value to be used as the event Source. - - - - - Action to take if the message is larger than the option. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether to return to the first target after any successful write. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - File encoding. - - - - - Line ending mode. - - - - - Indicates whether to compress archive files into the zip archive format. - - - - - Way file archives are numbered. - - - - - Name of the file to be used for an archive. - - - - - Is the an absolute or relative path? - - - - - Indicates whether to automatically archive log files every time the specified time passes. - - - - - Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: - - - - - Maximum number of archive files that should be kept. - - - - - Indicates whether the footer should be written only when the file is archived. - - - - - Maximum number of log filenames that should be stored as existing. - - - - - Is the an absolute or relative path? - - - - - Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation. - - - - - Indicates whether file creation calls should be synchronized by a system global mutex. - - - - - Indicates whether to replace file contents on each write instead of appending log message at the end. - - - - - Indicates whether to write BOM (byte order mark) in created files - - - - - Indicates whether to enable log file(s) to be deleted. - - - - - Name of the file to write to. - - - - - Value specifying the date format to use when archiving files. - - - - - Indicates whether to archive old log file on startup. - - - - - Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong. - - - - - Indicates whether to create directories if they do not exist. - - - - - Indicates whether to delete old log file on startup. - - - - - File attributes (Windows only). - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates whether concurrent writes to the log file by multiple processes on different network hosts. - - - - - Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. - - - - - Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). - - - - - Indicates whether to keep log file open instead of opening and closing it on each logging event. - - - - - Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write - - - - - Indicates whether concurrent writes to the log file by multiple processes on the same host. - - - - - Number of times the write is appended on the file before NLog discards the log message. - - - - - Delay in milliseconds to wait before attempting to write to the file again. - - - - - Log file buffer size in bytes. - - - - - Maximum number of seconds before open files are flushed. If this number is negative or zero the files are not flushed by timer. - - - - - Indicates whether to automatically flush the file buffers after each log message. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Condition expression. Log events who meet this condition will be forwarded to the wrapped target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Windows domain name to change context to. - - - - - Required impersonation level. - - - - - Type of the logon provider. - - - - - Logon Type. - - - - - User account password. - - - - - Indicates whether to revert to the credentials of the process instead of impersonating another user. - - - - - Username to change context to. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Interval in which messages will be written up to the number of messages. - - - - - Maximum allowed number of messages written per . - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Endpoint address. - - - - - Name of the endpoint configuration in WCF configuration file. - - - - - Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply) - - - - - Client ID. - - - - - Indicates whether to include per-event properties in the payload sent to the server. - - - - - Indicates whether to use binary message encoding. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Name of the parameter. - - - - - Type of the parameter. - - - - - Type of the parameter. Obsolete alias for - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether NewLine characters in the body should be replaced with tags. - - - - - Priority used for sending mails. - - - - - Encoding to be used for sending e-mail. - - - - - BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Indicates whether to add new lines between log entries. - - - - - Indicates whether to send message as HTML instead of plain text. - - - - - Sender's email address (e.g. joe@domain.com). - - - - - Mail message body (repeated for each log message send in one mail). - - - - - Mail subject. - - - - - Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates the SMTP client timeout. - - - - - SMTP Server to be used for sending. - - - - - SMTP Authentication mode. - - - - - Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. - - - - - Port number that SMTP Server is listening on. - - - - - Indicates whether the default Settings from System.Net.MailSettings should be used. - - - - - Folder where applications save mail messages to be processed by the local SMTP server. - - - - - Specifies how outgoing email messages will be handled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Max number of items to have in memory - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Class name. - - - - - Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Encoding to be used. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Maximum queue size. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Maximum queue size. - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Indicates whether to perform layout calculation. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether performance counter should be automatically created. - - - - - Name of the performance counter category. - - - - - Counter help text. - - - - - Name of the performance counter. - - - - - Performance counter type. - - - - - The value by which to increment the counter. - - - - - Performance counter instance name. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Default filter to be applied when no specific rule matches. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - Condition to be tested. - - - - - Resulting filter to be applied when the condition matches. - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of times to repeat each log message. - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of retries that should be attempted on the wrapped target in case of a failure. - - - - - Time to wait between retries in milliseconds. - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Always use independent of - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8. - - - - - Web service method name. Only used with Soap. - - - - - Web service namespace. Only used with Soap. - - - - - Protocol to be used when calling web service. - - - - - Custom proxy address, include port separated by a colon - - - - - Encoding. - - - - - Web service URL. - - - - - Value whether escaping be done according to the old NLog style (Very non-standard) - - - - - Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs) - - - - - Indicates whether to pre-authenticate the HttpWebRequest (Requires 'Authorization' in parameters) - - - - - Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see and ). - - - - - (optional) root namespace of the XML document, if POST of XML document chosen. (see and ). - - - - - Proxy configuration when calling web service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). - - - - - Column delimiter. - - - - - Quote Character. - - - - - Quoting mode. - - - - - Indicates whether CVS should include header. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout of the column. - - - - - Name of the column. - - - - - Override of Quoting mode - - - - - - - - - - - - - - - - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as JSON) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the JSON serializer follow object references before backing off - - - - - Option to render the empty object value {} - - - - - Option to suppress the extra spaces in the output json - - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Json encoded. - - - - - Indicates whether to escape non-ascii characters - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - - - - - - - - - - - - - - - - - Option to include all properties from the log events - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - - - - - - - - - - Layout text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - Name of the root XML element - - - - - Value inside the root XML element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Name of the element - - - - - Value inside the element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Condition expression. - - - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Default number of unique filter values to expect, will automatically increase if needed - - - - - Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout. - - - - - Layout to be used to filter log messages. - - - - - Max number of unique filter values to expect simultaneously - - - - - Max length of filter values, will truncate if above limit - - - - - How long before a filter expires, and logging is accepted again - - - - - Default buffer size for the internal buffers - - - - - Reuse internal buffers, and doesn't have to constantly allocate new buffers - - - - - Append FilterCount to the when an event is no longer filtered - - - - - Insert FilterCount value into when an event is no longer filtered - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/telnet/Telnet.vbproj b/telnet/Telnet.vbproj index 87aecd8..bd4079b 100644 --- a/telnet/Telnet.vbproj +++ b/telnet/Telnet.vbproj @@ -163,10 +163,6 @@ My Settings.Designer.vb - - Designer - - diff --git a/telnet/TelnetProtocolHandler.vb b/telnet/TelnetProtocolHandler.vb index 844865e..4bef3c7 100644 --- a/telnet/TelnetProtocolHandler.vb +++ b/telnet/TelnetProtocolHandler.vb @@ -32,8 +32,6 @@ Namespace De.Mud.Telnet ''' Public MustInherit Class TelnetProtocolHandler - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - #Region "Globals and properties" ''' @@ -441,10 +439,6 @@ Namespace De.Mud.Telnet Else USERVARs.Add("IBMSUBSPW", SubsPW) End If - 'Logger.Debug("ServerSeed=" & IBM_ServerSeed) - 'Logger.Debug("ClientSeed=" & ClientSeed) - 'Logger.Debug("UserName=" & UserName) - 'Logger.Debug("SubsPW=" & SubsPW) End If End If @@ -496,11 +490,9 @@ Namespace De.Mud.Telnet Case IAC s.WriteByte(IAC) s.WriteByte(IAC) - Logger.Debug("Escaped IAC") Case TELQUAL_VAR, TELQUAL_USERVAR, TELQUAL_VALUE, TELQUAL_ESC s.WriteByte(TELQUAL_ESC) s.WriteByte(b) - Logger.Debug("Escaped " & b.ToString) Case Else s.WriteByte(b) End Select @@ -509,7 +501,6 @@ Namespace De.Mud.Telnet s.Close() End Function Private Function NE_GetEnvironmentValueBytes(ByVal VarType As Byte, ByVal VarName As String, ByVal VarValue As String) As System.IO.MemoryStream - Logger.Debug("VarType=" & VarType.ToString & ", VarName=" & VarName & ", VarValue=" & VarValue) Dim ReplyStream As New System.IO.MemoryStream ReplyStream.WriteByte(VarType) Dim b() As Byte = StringToBytes(VarName) diff --git a/telnet/TelnetWrapper.vb b/telnet/TelnetWrapper.vb index cd94918..da6984c 100644 --- a/telnet/TelnetWrapper.vb +++ b/telnet/TelnetWrapper.vb @@ -43,8 +43,6 @@ Namespace De.Mud.Telnet Inherits TelnetProtocolHandler #Region "Globals and properties" - Private Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger - ' ManualResetEvent instances signal completion. Private connectDone As New ManualResetEvent(False) Private CertActionDone As New ManualResetEvent(False) @@ -103,7 +101,6 @@ Namespace De.Mud.Telnet Dim SSLStream As System.Net.Security.SslStream = DirectCast(stream, SslStream) Return New X509Certificate2(SSLStream.RemoteCertificate) Catch ex As Exception - Logger.Error(ex) End Try End If End If @@ -124,7 +121,6 @@ Namespace De.Mud.Telnet & vbCr & "Cipher: " & SSLStream.CipherAlgorithm.ToString & "(" & SSLStream.CipherStrength.ToString & ")" _ & vbCr & "KeyExchange: " & SSLStream.KeyExchangeAlgorithm.ToString & "(" & SSLStream.KeyExchangeStrength.ToString & ")" Catch ex As Exception - Logger.Error(ex) End Try End If End If @@ -220,7 +216,6 @@ Namespace De.Mud.Telnet ''' The Telnet port on the remote host. ''' Encrypt the connection with SSL? Public Sub Connect(ByVal host As String, ByVal port As Integer, UseSSL As Boolean) - Logger.Trace("") m_hostname = host m_port = port m_UseSSL = UseSSL @@ -244,24 +239,20 @@ Namespace De.Mud.Telnet ' Connect to the remote endpoint. connectDone.Reset() CertActionDone.Reset() - Logger.Debug("Calling BeginConnect...") Dim Result As System.IAsyncResult = tcp_client.BeginConnect(ipAddress, port, New AsyncCallback(AddressOf ConnectCallback), tcp_client) Dim Success As Boolean = Result.AsyncWaitHandle.WaitOne(15000) 'XXX 15 second timeout for BeginConnect. - Logger.Debug("BeginConnect finished") 'At this point we have not completed the connection, but it has either been accepted by the remote host or has timed out. - If Success Then + If Success Then If UseSSL Then CertActionDone.WaitOne() 'Wait for SSL negotiation to complete. We may be waiting for the user to accept the remote certificate, so don't time out. connectDone.WaitOne() 'Wait for ConnectCallback to complete. This is set in the Finally block of ConnectCallback. Else Throw New Exception("Timeout connecting to host") 'Timed out during BeginConnect End If Catch ex As Exception - Logger.Error(ex.Message, ex) Disconnect() Throw Finally Reset() - Logger.Debug("Firing ConnectionAttemptCompleted event") RaiseEvent ConnectionAttemptCompleted(Me, New EventArgs) End Try End Sub @@ -272,23 +263,19 @@ Namespace De.Mud.Telnet ''' the command ''' output of the command Public Function Send(ByVal cmd As String) As String - Logger.Trace("") Try Dim arr As Byte() = Encoding.ASCII.GetBytes(cmd) Transpose(arr) Return Nothing Catch ex As Exception - Logger.Error(ex.Message, ex) Disconnect() Throw (New ApplicationException("Error writing to socket.", ex)) End Try End Function Public Sub Send(ByVal bytes() As Byte) - Logger.Trace("") Try Transpose(bytes) Catch ex As Exception - Logger.Error(ex.Message, ex) Disconnect() Throw (New ApplicationException("Error writing to socket.", ex)) End Try @@ -309,22 +296,18 @@ Namespace De.Mud.Telnet End Sub Public Sub Disconnect(ByVal Reason As String) - Logger.Trace("") Static Disconnecting As Boolean If Not Disconnecting Then - Logger.Debug("Disconnecting ==> True") Disconnecting = True 'Try ' tcp_client.Client.Shutdown(SocketShutdown.Both) 'Catch ex As Exception - ' Logger.Error(ex.Message, ex) 'End Try Try tcp_client.Close() Catch ex As ObjectDisposedException 'Do nothing; this happens after we've already disconnected. Catch ex As Exception - Logger.Error(ex.Message, ex) End Try 'Setting stream to Nothing here enables our "Secured" property to return False on a closed tcpclient. @@ -333,12 +316,9 @@ Namespace De.Mud.Telnet Try RaiseEvent Disconnected(Me, New DisconnectEventArgs(Reason)) Catch ex As Exception - Logger.Error(ex.Message, ex) End Try - Logger.Debug("Disconnecting ==> False") Disconnecting = False Else - Logger.Debug("Aborting because Disconnecting = True") End If End Sub #End Region @@ -350,7 +330,6 @@ Namespace De.Mud.Telnet ''' ''' the buffer to be written Protected Overrides Sub Write(ByVal b As Byte()) - Logger.Trace("") Send(tcp_client, b) sendDone.WaitOne() End Sub @@ -361,7 +340,6 @@ Namespace De.Mud.Telnet ''' Stores state information for this asynchronous ''' operation as well as any user-defined data. Private Sub ConnectCallback(ByVal ar As IAsyncResult) - Logger.Trace("") Try ' Retrieve the socket from the state object. 'tcp_client = DirectCast(ar.AsyncState, TcpClient) @@ -378,7 +356,6 @@ Namespace De.Mud.Telnet End If connectDone.Set() 'Signal that the connection attempt has completed. Catch ex As Exception - Logger.Error(ex.Message, ex) CertActionDone.Set() 'Signal that SSL authentication has completed so we don't wait forever. connectDone.Set() 'Signal that the connection attempt has completed. Don't move this to a Finally block or Disconnect() will hang waiting for the signal. Disconnect() @@ -386,9 +363,8 @@ Namespace De.Mud.Telnet End Sub Private Function ServerCertificateValidationCallback(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As SslPolicyErrors) As Boolean - Logger.Trace("") Try - If sslPolicyErrors = sslPolicyErrors.None Then + If sslPolicyErrors = SslPolicyErrors.None Then Return True Else Dim Store As New X509Store(StoreName.TrustedPeople, StoreLocation.CurrentUser) @@ -401,9 +377,9 @@ Namespace De.Mud.Telnet 'We didn't find the cert in the store, so prompt the user. Dim Reasons As New List(Of String) - If sslPolicyErrors And sslPolicyErrors.RemoteCertificateNotAvailable Then Reasons.Add("Remote certificate not available") - If sslPolicyErrors And sslPolicyErrors.RemoteCertificateNameMismatch Then Reasons.Add("Remote certificate name mismatch") - If sslPolicyErrors And sslPolicyErrors.RemoteCertificateChainErrors Then Reasons.Add("Remote certificate chain errors") + If sslPolicyErrors And SslPolicyErrors.RemoteCertificateNotAvailable Then Reasons.Add("Remote certificate not available") + If sslPolicyErrors And SslPolicyErrors.RemoteCertificateNameMismatch Then Reasons.Add("Remote certificate name mismatch") + If sslPolicyErrors And SslPolicyErrors.RemoteCertificateChainErrors Then Reasons.Add("Remote certificate chain errors") Dim tmpDate As Date If Date.TryParse(certificate.GetEffectiveDateString, tmpDate) Then If tmpDate > Now Then Reasons.Add("Remote certificate is not yet valid") @@ -451,7 +427,6 @@ Namespace De.Mud.Telnet End If End If Catch ex As Exception - Logger.Error(ex.Message, ex) Return False Finally CertActionDone.Set() @@ -463,9 +438,6 @@ Namespace De.Mud.Telnet ''' ''' The socket to get data from. Private Sub Receive(ByVal client As TcpClient) - Logger.Trace("") - If client Is Nothing Then Logger.Debug("client is Nothing!") - If stream Is Nothing Then Logger.Debug("stream is Nothing!") If client IsNot Nothing Then If stream IsNot Nothing Then Try @@ -476,7 +448,6 @@ Namespace De.Mud.Telnet ' Begin receiving the data from the remote device. stream.BeginRead(state__1.Buffer, 0, State.BufferSize, New AsyncCallback(AddressOf ReceiveCallback), state__1) Catch ex As Exception - Logger.Error(ex.Message, ex) Disconnect() Throw (New ApplicationException("Error on read from socket.", ex)) End Try @@ -490,7 +461,6 @@ Namespace De.Mud.Telnet ''' Stores state information for this asynchronous ''' operation as well as any user-defined data. Private Sub ReceiveCallback(ByVal ar As IAsyncResult) - Logger.Trace("") Try ' Retrieve the state object and the client socket ' from the async state object. @@ -525,7 +495,6 @@ Namespace De.Mud.Telnet If ex.InnerException IsNot Nothing AndAlso ex.InnerException.GetType Is GetType(ObjectDisposedException) Then 'Do nothing; this happens after we've already disconnected. Else - Logger.Error(ex.Message, ex) Disconnect("Error reading from socket or processing received data: " & ex.Message) End If End Try @@ -537,7 +506,6 @@ Namespace De.Mud.Telnet ''' The socket to write to. ''' The data to write. Private Sub Send(ByVal client As TcpClient, ByVal byteData As Byte()) - Logger.Trace("") ' Begin sending the data to the remote device. sendDone.Reset() stream.BeginWrite(byteData, 0, byteData.Length, New AsyncCallback(AddressOf SendCallback), client) @@ -549,7 +517,6 @@ Namespace De.Mud.Telnet ''' Stores state information for this asynchronous ''' operation as well as any user-defined data. Private Sub SendCallback(ByVal ar As IAsyncResult) - Logger.Trace("") ' Retrieve the socket from the state object. 'Dim client As TcpClient = DirectCast(ar.AsyncState, TcpClient) @@ -557,7 +524,6 @@ Namespace De.Mud.Telnet Try stream.EndWrite(ar) Catch ex As Exception - Logger.Error(ex.Message, ex) End Try ' Signal that all bytes have been sent. @@ -568,7 +534,6 @@ Namespace De.Mud.Telnet Private Function TCPClient_Connected(Client As TcpClient) As Boolean Try - Logger.Trace("Started") If Client Is Nothing Then Return False 'Return Client.Connected 'this is unreliable @@ -580,10 +545,8 @@ Namespace De.Mud.Telnet Return False End If Catch ex As Exception - 'Logger.Error(ex.Message, ex) Return False Finally - Logger.Trace("Finished") End Try End Function @@ -601,25 +564,21 @@ Namespace De.Mud.Telnet #Region "Cleanup" Public Sub Close() - Logger.Trace("") Dispose() End Sub Public Sub Dispose() - Logger.Trace("") GC.SuppressFinalize(Me) Dispose(True) End Sub Protected Sub Dispose(ByVal disposing As Boolean) - Logger.Trace("") If disposing Then Disconnect() End If End Sub Protected Overrides Sub Finalize() - Logger.Trace("") Try Dispose(False) Finally diff --git a/telnet/packages.config b/telnet/packages.config deleted file mode 100644 index 33fb1e1..0000000 --- a/telnet/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file