diff --git a/utility.c b/utility.c
index 64e81a8..8326283 100644
--- a/utility.c
+++ b/utility.c
@@ -3,6 +3,12 @@
 #include<stdlib.h>
 #include <unistd.h>
 #include <getopt.h>
+#include<ctype.h>
+#include<stdarg.h>
+#include <sys/types.h>
+#include <pwd.h>
+#include <errno.h>
+#include <sys/stat.h>
 #include <sys/time.h>
 #include <time.h>
 #include <assert.h>
@@ -10,6 +16,7 @@
 #include <config.h>
 #endif
 
+
 #include <ccn/ccn.h>
 #include <ccn/uri.h>
 #include <ccn/keystore.h>
@@ -17,6 +24,7 @@
 #include <ccn/schedule.h>
 #include <ccn/hashtb.h>
 
+
 #include "utility.h"
 
 
@@ -95,3 +103,114 @@
 	return diff_secs;
 }
 
+
+void  
+startLogging(char *loggingDir)
+{
+	struct passwd pd;
+	struct passwd* pwdptr=&pd;
+	struct passwd* tempPwdPtr;
+	char *pwdbuffer;
+	int  pwdlinelen = 200;
+	char *logDir;
+	char *logFileName;
+	char *ret;
+	char *logExt;
+	char *defaultLogDir;	
+	int status;
+	struct stat st;
+	int isLogDirExists=0;
+	char *time=getLocalTimeStamp();
+
+	pwdbuffer=(char *)malloc(sizeof(char)*200);
+	memset(pwdbuffer,0,200);		
+	logDir=(char *)malloc(sizeof(char)*200);
+	memset(logDir,0,200);
+	logFileName=(char *)malloc(sizeof(char)*200);
+	memset(logFileName,0,200);
+	logExt=(char *)malloc(sizeof(char)*5);
+	memset(logExt,0,5);
+	defaultLogDir=(char *)malloc(sizeof(char)*10);
+	memset(defaultLogDir,0,10);
+
+	memcpy(logExt,".log",4);
+	logExt[4]='\0';
+	memcpy(defaultLogDir,"/nlsrLog",9);
+	defaultLogDir[9]='\0';
+
+	if(loggingDir!=NULL)
+ 	{
+		if( stat( loggingDir, &st)==0)
+		{
+			if ( st.st_mode & S_IFDIR )
+			{
+				if( st.st_mode & S_IWUSR)
+				{
+					isLogDirExists=1;
+					memcpy(logDir,loggingDir,strlen(loggingDir)+1);
+				}
+				else printf("User do not have write permission to %s \n",loggingDir);
+			}
+			else printf("Provided path for %s is not a directory!!\n",loggingDir);
+    		}
+  		else printf("Log directory: %s does not exists\n",loggingDir);
+	} 
+  
+	if(isLogDirExists == 0)
+  	{
+		if ((getpwuid_r(getuid(),pwdptr,pwdbuffer,pwdlinelen,&tempPwdPtr))!=0)
+     			perror("getpwuid_r() error.");
+  		else
+  		{
+			memcpy(logDir,pd.pw_dir,strlen(pd.pw_dir)+1);	
+			memcpy(logDir+strlen(logDir),defaultLogDir,strlen(defaultLogDir)+1);	
+			if(stat(logDir,&st) != 0)
+				status = mkdir(logDir, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);	
+		}
+	}	
+ 	memcpy(logFileName,logDir,strlen(logDir)+1);	
+	if( logDir[strlen(logDir)-1]!='/')
+	{
+		memcpy(logFileName+strlen(logFileName),"/",1);
+		memcpy(logFileName+strlen(logFileName),"\0",1);	
+	}	
+	memcpy(logFileName+strlen(logFileName),time,strlen(time)+1);	
+	memcpy(logFileName+strlen(logFileName),logExt,strlen(logExt)+1);	
+	ret=(char *)malloc(strlen(logFileName)+1);
+	memset(ret,0,strlen(logFileName)+1);
+       	memcpy(ret,logFileName,strlen(logFileName)+1); 
+
+	setenv("NLSR_LOG_FILE",ret,1);
+
+	free(time);	
+	free(logDir);
+	free(logFileName);	
+	free(pwdbuffer);	
+	free(logExt);
+	free(defaultLogDir);
+	free(ret);	
+}
+
+
+void 
+writeLogg(const char *source_file, const char *function, const int line, const char *format, ...)
+{
+	char *file=getenv("NLSR_LOG_FILE");	
+	if (file != NULL)
+	{
+		FILE *fp = fopen(file, "a");
+
+		if (fp != NULL)
+		{            
+			struct timeval t;
+			gettimeofday(&t, NULL);
+			fprintf(fp,"%ld.%06u - %s, %s, %d:",(long)t.tv_sec , (unsigned)t.tv_usec , source_file , function , line);        
+			va_list args;
+			va_start(args, format);
+			vfprintf(fp, format, args);
+			fclose(fp);
+			va_end(args);	
+		}
+    	}
+}
+
