Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
utils
Commits
41043069
Commit
41043069
authored
21 years ago
by
Mark Jenkinson
Browse files
Options
Downloads
Patches
Plain Diff
Removed dead Log.h and Log.cc, leaving log.h and log.cc
parent
ec1cacd4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Log.cc
+0
-78
0 additions, 78 deletions
Log.cc
Log.h
+0
-10
0 additions, 10 deletions
Log.h
with
0 additions
and
88 deletions
Log.cc
deleted
100644 → 0
+
0
−
78
View file @
ec1cacd4
/* Log.cc
Mark Woolrich, FMRIB Image Analysis Group
Copyright (C) 1999-2000 University of Oxford */
/* CCOPYRIGHT */
#include
"Log.h"
#include
<iostream>
#include
<fstream>
#include
<strstream>
#include
<string>
namespace
Utilities
{
Log
*
Log
::
logger
=
NULL
;
int
Log
::
count
=
0
;
template
<
class
t
>
string
tostring
(
const
t
obj
)
{
char
strc
[
100
];
ostrstream
str
(
strc
,
100
);
str
<<
obj
<<
'\0'
;
return
string
(
strc
);
}
// SPECIFIC INSTANTIATIONS
template
<
int
>
string
tostring
(
const
int
obj
);
void
Log
::
makeDir
(
const
string
&
pdirname
,
const
string
&
plogfilename
)
{
dir
=
pdirname
;
logfilename
=
plogfilename
;
// make directory to place results into:
// keep adding "+" until directory is made:
int
count
=
0
;
while
(
true
)
{
if
(
count
>=
20
)
{
string
s
(
"Cannot create directory "
+
dir
);
throw
Exception
(
s
.
c_str
());
}
int
ret
=
system
((
"mkdir "
+
dir
+
" 2>/dev/null"
).
c_str
());
if
(
ret
==
0
)
{
break
;
}
dir
=
dir
+
"+"
;
count
++
;
}
// setup logfile
logfileout
.
open
((
dir
+
"/"
+
logfilename
).
c_str
(),
ios
::
out
);
logEstablished
=
true
;
}
void
Log
::
setDir
(
const
string
&
pdirname
,
const
string
&
plogfilename
)
{
dir
=
pdirname
;
logfilename
=
plogfilename
;
// setup logfile
logfileout
.
open
((
dir
+
"/"
+
logfilename
).
c_str
(),
ios
::
out
);
logEstablished
=
true
;
}
}
This diff is collapsed.
Click to expand it.
Log.h
deleted
100644 → 0
+
0
−
10
View file @
ec1cacd4
/* log.h
Mark Woolrich, FMRIB Image Analysis Group
Copyright (C) 1999-2000 University of Oxford */
/* CCOPYRIGHT */
#include
"log.h"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment