2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_CRONOLOG_H_
18 #define incl_HPHP_CRONOLOG_H_
24 #include "hphp/util/cronoutils.h"
25 #include "hphp/util/lock.h"
26 #include "hphp/util/log-file-flusher.h"
29 ///////////////////////////////////////////////////////////////////////////////
34 m_periodicity(UNKNOWN
),
35 m_periodDelayUnits(UNKNOWN
),
38 m_useAmericanDateFormats(0),
40 m_prevLinkName(nullptr),
46 if (m_prevFile
) fclose(m_prevFile
);
47 if (m_file
) fclose(m_file
);
49 void setPeriodicity();
50 FILE *getOutputFile();
51 static void changeOwner(const std::string
&username
,
52 const std::string
&symlink
);
54 PERIODICITY m_periodicity
;
55 PERIODICITY m_periodDelayUnits
;
58 int m_useAmericanDateFormats
;
59 char m_fileName
[PATH_MAX
];
61 std::string m_template
;
62 std::string m_linkName
;
68 LogFileFlusher flusher
;
72 Cronolog(const Cronolog
&); // suppress
73 Cronolog
&operator=(const Cronolog
&); // suppress
76 ///////////////////////////////////////////////////////////////////////////////
79 #endif // incl_HPHP_CRONOLOG_H_