nighttrain's Profile User Rating: -----

Reputation: 8 Worker
Group:
Active Members
Active Posts:
424 (0.25 per day)
Joined:
22-September 10
Profile Views:
5,899
Last Active:
User is offline May 16 2015 02:37 AM
Currently:
Offline

Previous Fields

Country:
PL
OS Preference:
Windows
Favorite Browser:
Internet Explorer
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Volkswagen
Dream Kudos:
0
Icon   nighttrain still drilling

Posts I've Made

  1. In Topic: Postgres uses a lot of memory

    Posted 15 May 2015

    hi andrewsw,
    sure i will check and examine queries e.g count(*), likes etc. it could consume a lot of memory as well. What about self postgres configuration itself, is there somethin within postgres i could take a look, or even limit memory usage?
  2. In Topic: migrate bulk insert from sql server to oracle

    Posted 28 Apr 2015

    I dont want to migrate data from sql server database. What i need is to replace actuall code loader but now for oracle. SQl server bul is good because i am not obligated to defife config file like is within sql loader tool. My vb.net application is gathering a lot of .csv delimeted files with diffrent count of columns etc. Sql server bulk is independent of that but if i would go sql loader then i would need to define for each file its own config and thats what i would like toa avoid.
  3. In Topic: Log class in use by diffrent windows services

    Posted 27 Mar 2015

    Yes i still didn't get appropriate answer, can anyone give some feedback on last question?
  4. In Topic: Log class in use by diffrent windows services

    Posted 27 Mar 2015

    I got solution with couple of projects including 3 windows services projects and one logger project which is shared class. Due to all services are using same logger project class i need a lock to avoid "process cannot access file because of another process..". In this situation 3 separated services writing to this logger. I made mutex and have two question for you.

    1) Is this use of mutex correct and will prevent other service to write but wait till other finish his job?

    2) In my case instead of putting: "Global\MyProjectName_823742384234" - can i put: "Global\" + Guid.NewGuid.ToString()" ?. Changing to dynamic guid does my 3 windows services will be still synchronized in case of logger class? Should i do like i have or with newguid?

    Here's my logger class:

    Imports System.IO
    Imports System.Threading
    
    Public NotInheritable Class Logger
    
        Private Shared ReadOnly _locker As New Mutex(False, "MyProjectName_823742384234")
    
    
          Public Shared Sub LogIt(ByVal engine As String, ByVal msg As String, ByVal logMessage As String, ByVal Path As String, ByVal IsDebug As Boolean)
    
    
                _locker.WaitOne()
    
                Try
                    If File.Exists(Path) Then
                        If IsDebug Then
                            Debug.Print(DateTime.Now & "> " & "| " & engine & " | " & msg & " | " & logMessage)
                            ' Debug.Print(message)
                        Else
                                Using w As TextWriter = File.AppendText(Path)
    
                                    'w.WriteLine(message)
                                    w.WriteLine(DateTime.Now & "> " & "| " & engine & " | " & msg & " | " & logMessage)
                                    w.Flush()
                                End Using
                        End If
                    Else
                        If IsDebug Then
                            '  Debug.Print(message)
                            Debug.Print(DateTime.Now & "> " & "| " & engine & " | " & msg & " | " & logMessage)
                        Else
                                Using w As TextWriter = File.CreateText(Path)
                                    '   w.WriteLine(message)
                                    w.WriteLine(DateTime.Now & "> " & "| " & engine & " | " & msg & " | " & logMessage)
                                    w.Flush()
                                End Using
                        End If
                    End If
    
                Finally
                    _locker.ReleaseMutex()
                End Try
    
            End Sub
    
        End Class
    
    
  5. In Topic: Objects before/in runtime

    Posted 21 Mar 2015

    i know :) but this is the point - instead List(Of String) is it possible to create/Load class/enum based on instead of List(Of String) for instance?

My Information

Member Title:
D.I.C Regular
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Poland
Full Name:
Bob
Years Programming:
4
Programming Languages:
VB,NET

Contact Information

E-mail:
Click here to e-mail me
ICQ:
ICQ  637172526

Friends

Comments

Page 1 of 1
  1. Photo

    FlashM Icon

    24 Sep 2010 - 14:17
    no problem... you're welcome anytime...
Page 1 of 1