akaaafk commited on
Commit
a0d9da5
·
verified ·
1 Parent(s): 129c10e

Add/update benchmark/NYU_CTF_Bench (part 3)

Browse files
Files changed (15) hide show
  1. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/packages/.gitkeep +0 -0
  2. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/autoload.php +7 -0
  3. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/ClassLoader.php +246 -0
  4. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/autoload_classmap.php +9 -0
  5. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/autoload_namespaces.php +12 -0
  6. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/autoload_real.php +43 -0
  7. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/installed.json +152 -0
  8. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/CHANGELOG.mdown +92 -0
  9. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/LICENSE +19 -0
  10. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/README.mdown +230 -0
  11. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/composer.json +39 -0
  12. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/doc/extending.md +76 -0
  13. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/doc/sockets.md +37 -0
  14. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/doc/usage.md +158 -0
  15. benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/phpunit.xml.dist +15 -0
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/packages/.gitkeep ADDED
File without changes
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/autoload.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload.php @generated by Composer
4
+
5
+ require_once __DIR__ . '/composer' . '/autoload_real.php';
6
+
7
+ return ComposerAutoloaderInitcf76d61f17a38dc58b9f449b04664d1d::getLoader();
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0 class loader
17
+ *
18
+ * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
19
+ *
20
+ * $loader = new \Composer\Autoload\ClassLoader();
21
+ *
22
+ * // register classes with namespaces
23
+ * $loader->add('Symfony\Component', __DIR__.'/component');
24
+ * $loader->add('Symfony', __DIR__.'/framework');
25
+ *
26
+ * // activate the autoloader
27
+ * $loader->register();
28
+ *
29
+ * // to enable searching the include path (eg. for PEAR packages)
30
+ * $loader->setUseIncludePath(true);
31
+ *
32
+ * In this example, if you try to use a class in the Symfony\Component
33
+ * namespace or one of its children (Symfony\Component\Console for instance),
34
+ * the autoloader will first look for the class under the component/
35
+ * directory, and it will then fallback to the framework/ directory if not
36
+ * found before giving up.
37
+ *
38
+ * This class is loosely based on the Symfony UniversalClassLoader.
39
+ *
40
+ * @author Fabien Potencier <fabien@symfony.com>
41
+ * @author Jordi Boggiano <j.boggiano@seld.be>
42
+ */
43
+ class ClassLoader
44
+ {
45
+ private $prefixes = array();
46
+ private $fallbackDirs = array();
47
+ private $useIncludePath = false;
48
+ private $classMap = array();
49
+
50
+ public function getPrefixes()
51
+ {
52
+ return call_user_func_array('array_merge', $this->prefixes);
53
+ }
54
+
55
+ public function getFallbackDirs()
56
+ {
57
+ return $this->fallbackDirs;
58
+ }
59
+
60
+ public function getClassMap()
61
+ {
62
+ return $this->classMap;
63
+ }
64
+
65
+ /**
66
+ * @param array $classMap Class to filename map
67
+ */
68
+ public function addClassMap(array $classMap)
69
+ {
70
+ if ($this->classMap) {
71
+ $this->classMap = array_merge($this->classMap, $classMap);
72
+ } else {
73
+ $this->classMap = $classMap;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Registers a set of classes, merging with any others previously set.
79
+ *
80
+ * @param string $prefix The classes prefix
81
+ * @param array|string $paths The location(s) of the classes
82
+ * @param bool $prepend Prepend the location(s)
83
+ */
84
+ public function add($prefix, $paths, $prepend = false)
85
+ {
86
+ if (!$prefix) {
87
+ if ($prepend) {
88
+ $this->fallbackDirs = array_merge(
89
+ (array) $paths,
90
+ $this->fallbackDirs
91
+ );
92
+ } else {
93
+ $this->fallbackDirs = array_merge(
94
+ $this->fallbackDirs,
95
+ (array) $paths
96
+ );
97
+ }
98
+
99
+ return;
100
+ }
101
+
102
+ $first = $prefix[0];
103
+ if (!isset($this->prefixes[$first][$prefix])) {
104
+ $this->prefixes[$first][$prefix] = (array) $paths;
105
+
106
+ return;
107
+ }
108
+ if ($prepend) {
109
+ $this->prefixes[$first][$prefix] = array_merge(
110
+ (array) $paths,
111
+ $this->prefixes[$first][$prefix]
112
+ );
113
+ } else {
114
+ $this->prefixes[$first][$prefix] = array_merge(
115
+ $this->prefixes[$first][$prefix],
116
+ (array) $paths
117
+ );
118
+ }
119
+ }
120
+
121
+ /**
122
+ * Registers a set of classes, replacing any others previously set.
123
+ *
124
+ * @param string $prefix The classes prefix
125
+ * @param array|string $paths The location(s) of the classes
126
+ */
127
+ public function set($prefix, $paths)
128
+ {
129
+ if (!$prefix) {
130
+ $this->fallbackDirs = (array) $paths;
131
+
132
+ return;
133
+ }
134
+ $this->prefixes[substr($prefix, 0, 1)][$prefix] = (array) $paths;
135
+ }
136
+
137
+ /**
138
+ * Turns on searching the include path for class files.
139
+ *
140
+ * @param bool $useIncludePath
141
+ */
142
+ public function setUseIncludePath($useIncludePath)
143
+ {
144
+ $this->useIncludePath = $useIncludePath;
145
+ }
146
+
147
+ /**
148
+ * Can be used to check if the autoloader uses the include path to check
149
+ * for classes.
150
+ *
151
+ * @return bool
152
+ */
153
+ public function getUseIncludePath()
154
+ {
155
+ return $this->useIncludePath;
156
+ }
157
+
158
+ /**
159
+ * Registers this instance as an autoloader.
160
+ *
161
+ * @param bool $prepend Whether to prepend the autoloader or not
162
+ */
163
+ public function register($prepend = false)
164
+ {
165
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
166
+ }
167
+
168
+ /**
169
+ * Unregisters this instance as an autoloader.
170
+ */
171
+ public function unregister()
172
+ {
173
+ spl_autoload_unregister(array($this, 'loadClass'));
174
+ }
175
+
176
+ /**
177
+ * Loads the given class or interface.
178
+ *
179
+ * @param string $class The name of the class
180
+ * @return bool|null True if loaded, null otherwise
181
+ */
182
+ public function loadClass($class)
183
+ {
184
+ if ($file = $this->findFile($class)) {
185
+ include $file;
186
+
187
+ return true;
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Finds the path to the file where the class is defined.
193
+ *
194
+ * @param string $class The name of the class
195
+ *
196
+ * @return string|false The path if found, false otherwise
197
+ */
198
+ public function findFile($class)
199
+ {
200
+ // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
201
+ if ('\\' == $class[0]) {
202
+ $class = substr($class, 1);
203
+ }
204
+
205
+ if (isset($this->classMap[$class])) {
206
+ return $this->classMap[$class];
207
+ }
208
+
209
+ if (false !== $pos = strrpos($class, '\\')) {
210
+ // namespaced class name
211
+ $classPath = strtr(substr($class, 0, $pos), '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
212
+ $className = substr($class, $pos + 1);
213
+ } else {
214
+ // PEAR-like class name
215
+ $classPath = null;
216
+ $className = $class;
217
+ }
218
+
219
+ $classPath .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php';
220
+
221
+ $first = $class[0];
222
+ if (isset($this->prefixes[$first])) {
223
+ foreach ($this->prefixes[$first] as $prefix => $dirs) {
224
+ if (0 === strpos($class, $prefix)) {
225
+ foreach ($dirs as $dir) {
226
+ if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
227
+ return $dir . DIRECTORY_SEPARATOR . $classPath;
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ foreach ($this->fallbackDirs as $dir) {
235
+ if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
236
+ return $dir . DIRECTORY_SEPARATOR . $classPath;
237
+ }
238
+ }
239
+
240
+ if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) {
241
+ return $file;
242
+ }
243
+
244
+ return $this->classMap[$class] = false;
245
+ }
246
+ }
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname(dirname($vendorDir));
7
+
8
+ return array(
9
+ );
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname(dirname($vendorDir));
7
+
8
+ return array(
9
+ 'Psr\\Log\\' => array($vendorDir . '/psr/log'),
10
+ 'Monolog' => array($vendorDir . '/monolog/monolog/src'),
11
+ 'Fuel\\Upload' => array($vendorDir . '/fuelphp/upload/src'),
12
+ );
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInitcf76d61f17a38dc58b9f449b04664d1d
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ public static function getLoader()
17
+ {
18
+ if (null !== self::$loader) {
19
+ return self::$loader;
20
+ }
21
+
22
+ spl_autoload_register(array('ComposerAutoloaderInitcf76d61f17a38dc58b9f449b04664d1d', 'loadClassLoader'), true, true);
23
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitcf76d61f17a38dc58b9f449b04664d1d', 'loadClassLoader'));
25
+
26
+ $vendorDir = dirname(__DIR__);
27
+ $baseDir = dirname(dirname($vendorDir));
28
+
29
+ $map = require __DIR__ . '/autoload_namespaces.php';
30
+ foreach ($map as $namespace => $path) {
31
+ $loader->set($namespace, $path);
32
+ }
33
+
34
+ $classMap = require __DIR__ . '/autoload_classmap.php';
35
+ if ($classMap) {
36
+ $loader->addClassMap($classMap);
37
+ }
38
+
39
+ $loader->register(true);
40
+
41
+ return $loader;
42
+ }
43
+ }
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/composer/installed.json ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "name": "psr/log",
4
+ "version": "1.0.0",
5
+ "version_normalized": "1.0.0.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/php-fig/log.git",
9
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
10
+ },
11
+ "dist": {
12
+ "type": "zip",
13
+ "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
14
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
15
+ "shasum": ""
16
+ },
17
+ "time": "2012-12-21 11:40:51",
18
+ "type": "library",
19
+ "installation-source": "dist",
20
+ "autoload": {
21
+ "psr-0": {
22
+ "Psr\\Log\\": ""
23
+ }
24
+ },
25
+ "notification-url": "https://packagist.org/downloads/",
26
+ "license": [
27
+ "MIT"
28
+ ],
29
+ "authors": [
30
+ {
31
+ "name": "PHP-FIG",
32
+ "homepage": "http://www.php-fig.org/"
33
+ }
34
+ ],
35
+ "description": "Common interface for logging libraries",
36
+ "keywords": [
37
+ "log",
38
+ "psr",
39
+ "psr-3"
40
+ ]
41
+ },
42
+ {
43
+ "name": "monolog/monolog",
44
+ "version": "1.5.0",
45
+ "version_normalized": "1.5.0.0",
46
+ "source": {
47
+ "type": "git",
48
+ "url": "https://github.com/Seldaek/monolog.git",
49
+ "reference": "583618d5cd2115a52101694aca87afb182b3e567"
50
+ },
51
+ "dist": {
52
+ "type": "zip",
53
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/583618d5cd2115a52101694aca87afb182b3e567",
54
+ "reference": "583618d5cd2115a52101694aca87afb182b3e567",
55
+ "shasum": ""
56
+ },
57
+ "require": {
58
+ "php": ">=5.3.0",
59
+ "psr/log": "~1.0"
60
+ },
61
+ "require-dev": {
62
+ "doctrine/couchdb": "dev-master",
63
+ "mlehner/gelf-php": "1.0.*",
64
+ "raven/raven": "0.3.*"
65
+ },
66
+ "suggest": {
67
+ "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
68
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
69
+ "ext-mongo": "Allow sending log messages to a MongoDB server",
70
+ "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server",
71
+ "raven/raven": "Allow sending log messages to a Sentry server"
72
+ },
73
+ "time": "2013-04-23 10:09:48",
74
+ "type": "library",
75
+ "extra": {
76
+ "branch-alias": {
77
+ "dev-master": "1.4.x-dev"
78
+ }
79
+ },
80
+ "installation-source": "dist",
81
+ "autoload": {
82
+ "psr-0": {
83
+ "Monolog": "src/"
84
+ }
85
+ },
86
+ "notification-url": "https://packagist.org/downloads/",
87
+ "license": [
88
+ "MIT"
89
+ ],
90
+ "authors": [
91
+ {
92
+ "name": "Jordi Boggiano",
93
+ "email": "j.boggiano@seld.be",
94
+ "homepage": "http://seld.be",
95
+ "role": "Developer"
96
+ }
97
+ ],
98
+ "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
99
+ "homepage": "http://github.com/Seldaek/monolog",
100
+ "keywords": [
101
+ "log",
102
+ "logging",
103
+ "psr-3"
104
+ ]
105
+ },
106
+ {
107
+ "name": "fuelphp/upload",
108
+ "version": "2.0.1",
109
+ "version_normalized": "2.0.1.0",
110
+ "source": {
111
+ "type": "git",
112
+ "url": "https://github.com/fuelphp/upload.git",
113
+ "reference": "6310108de98ffdbf1083612db5b15411fc140c90"
114
+ },
115
+ "dist": {
116
+ "type": "zip",
117
+ "url": "https://api.github.com/repos/fuelphp/upload/zipball/6310108de98ffdbf1083612db5b15411fc140c90",
118
+ "reference": "6310108de98ffdbf1083612db5b15411fc140c90",
119
+ "shasum": ""
120
+ },
121
+ "require": {
122
+ "php": ">=5.3"
123
+ },
124
+ "require-dev": {
125
+ "mockery/mockery": "0.7.*"
126
+ },
127
+ "time": "2013-10-11 21:42:58",
128
+ "type": "library",
129
+ "installation-source": "dist",
130
+ "autoload": {
131
+ "psr-0": {
132
+ "Fuel\\Upload": "src/"
133
+ }
134
+ },
135
+ "notification-url": "https://packagist.org/downloads/",
136
+ "license": [
137
+ "MIT"
138
+ ],
139
+ "authors": [
140
+ {
141
+ "name": "FuelPHP Development Team",
142
+ "email": "team@fuelphp.com"
143
+ }
144
+ ],
145
+ "description": "Uploaded file processing.",
146
+ "homepage": "https://github.com/fuelphp/upload",
147
+ "keywords": [
148
+ "file uploads",
149
+ "upload"
150
+ ]
151
+ }
152
+ ]
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/CHANGELOG.mdown ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### 1.5.0 (2013-04-23)
2
+
3
+ * Added ProcessIdProcessor to inject the PID in log records
4
+ * Added UidProcessor to inject a unique identifier to all log records of one request/run
5
+ * Added support for previous exceptions in the LineFormatter exception serialization
6
+ * Added Monolog\Logger::getLevels() to get all available levels
7
+ * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle
8
+
9
+ ### 1.4.1 (2013-04-01)
10
+
11
+ * Fixed exception formatting in the LineFormatter to be more minimalistic
12
+ * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0
13
+ * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days
14
+ * Fixed WebProcessor array access so it checks for data presence
15
+ * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors
16
+
17
+ ### 1.4.0 (2013-02-13)
18
+
19
+ * Added RedisHandler to log to Redis via the Predis library or the phpredis extension
20
+ * Added ZendMonitorHandler to log to the Zend Server monitor
21
+ * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor
22
+ * Added `$useSSL` option to the PushoverHandler which is enabled by default
23
+ * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously
24
+ * Fixed header injection capability in the NativeMailHandler
25
+
26
+ ### 1.3.1 (2013-01-11)
27
+
28
+ * Fixed LogstashFormatter to be usable with stream handlers
29
+ * Fixed GelfMessageFormatter levels on Windows
30
+
31
+ ### 1.3.0 (2013-01-08)
32
+
33
+ * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface`
34
+ * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance
35
+ * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash)
36
+ * Added PushoverHandler to send mobile notifications
37
+ * Added CouchDBHandler and DoctrineCouchDBHandler
38
+ * Added RavenHandler to send data to Sentry servers
39
+ * Added support for the new MongoClient class in MongoDBHandler
40
+ * Added microsecond precision to log records' timestamps
41
+ * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing
42
+ the oldest entries
43
+ * Fixed normalization of objects with cyclic references
44
+
45
+ ### 1.2.1 (2012-08-29)
46
+
47
+ * Added new $logopts arg to SyslogHandler to provide custom openlog options
48
+ * Fixed fatal error in SyslogHandler
49
+
50
+ ### 1.2.0 (2012-08-18)
51
+
52
+ * Added AmqpHandler (for use with AMQP servers)
53
+ * Added CubeHandler
54
+ * Added NativeMailerHandler::addHeader() to send custom headers in mails
55
+ * Added the possibility to specify more than one recipient in NativeMailerHandler
56
+ * Added the possibility to specify float timeouts in SocketHandler
57
+ * Added NOTICE and EMERGENCY levels to conform with RFC 5424
58
+ * Fixed the log records to use the php default timezone instead of UTC
59
+ * Fixed BufferHandler not being flushed properly on PHP fatal errors
60
+ * Fixed normalization of exotic resource types
61
+ * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog
62
+
63
+ ### 1.1.0 (2012-04-23)
64
+
65
+ * Added Monolog\Logger::isHandling() to check if a handler will
66
+ handle the given log level
67
+ * Added ChromePHPHandler
68
+ * Added MongoDBHandler
69
+ * Added GelfHandler (for use with Graylog2 servers)
70
+ * Added SocketHandler (for use with syslog-ng for example)
71
+ * Added NormalizerFormatter
72
+ * Added the possibility to change the activation strategy of the FingersCrossedHandler
73
+ * Added possibility to show microseconds in logs
74
+ * Added `server` and `referer` to WebProcessor output
75
+
76
+ ### 1.0.2 (2011-10-24)
77
+
78
+ * Fixed bug in IE with large response headers and FirePHPHandler
79
+
80
+ ### 1.0.1 (2011-08-25)
81
+
82
+ * Added MemoryPeakUsageProcessor and MemoryUsageProcessor
83
+ * Added Monolog\Logger::getName() to get a logger's channel name
84
+
85
+ ### 1.0.0 (2011-07-06)
86
+
87
+ * Added IntrospectionProcessor to get info from where the logger was called
88
+ * Fixed WebProcessor in CLI
89
+
90
+ ### 1.0.0-RC1 (2011-07-01)
91
+
92
+ * Initial release
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/LICENSE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) Jordi Boggiano
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/README.mdown ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Monolog - Logging for PHP 5.3+ [![Build Status](https://secure.travis-ci.org/Seldaek/monolog.png)](http://travis-ci.org/Seldaek/monolog)
2
+ ==============================
3
+
4
+ Monolog sends your logs to files, sockets, inboxes, databases and various
5
+ web services. See the complete list of handlers below. Special handlers
6
+ allow you to build advanced logging strategies.
7
+
8
+ This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
9
+ interface that you can type-hint against in your own libraries to keep
10
+ a maximum of interoperability. You can also use it in your applications to
11
+ make sure you can always use another compatible logger at a later time.
12
+
13
+ Usage
14
+ -----
15
+
16
+ ```php
17
+ <?php
18
+
19
+ use Monolog\Logger;
20
+ use Monolog\Handler\StreamHandler;
21
+
22
+ // create a log channel
23
+ $log = new Logger('name');
24
+ $log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING));
25
+
26
+ // add records to the log
27
+ $log->addWarning('Foo');
28
+ $log->addError('Bar');
29
+ ```
30
+
31
+ Core Concepts
32
+ -------------
33
+
34
+ Every `Logger` instance has a channel (name) and a stack of handlers. Whenever
35
+ you add a record to the logger, it traverses the handler stack. Each handler
36
+ decides whether it handled fully the record, and if so, the propagation of the
37
+ record ends there.
38
+
39
+ This allows for flexible logging setups, for example having a `StreamHandler` at
40
+ the bottom of the stack that will log anything to disk, and on top of that add
41
+ a `MailHandler` that will send emails only when an error message is logged.
42
+ Handlers also have a `$bubble` property which defines whether they block the
43
+ record or not if they handled it. In this example, setting the `MailHandler`'s
44
+ `$bubble` argument to true means that all records will propagate to the
45
+ `StreamHandler`, even the errors that are handled by the `MailHandler`.
46
+
47
+ You can create many `Logger`s, each defining a channel (e.g.: db, request,
48
+ router, ..) and each of them combining various handlers, which can be shared
49
+ or not. The channel is reflected in the logs and allows you to easily see or
50
+ filter records.
51
+
52
+ Each Handler also has a Formatter, a default one with settings that make sense
53
+ will be created if you don't set one. The formatters normalize and format
54
+ incoming records so that they can be used by the handlers to output useful
55
+ information.
56
+
57
+ Custom severity levels are not available. Only the eight
58
+ [RFC 5424](http://tools.ietf.org/html/rfc5424) levels (debug, info, notice,
59
+ warning, error, critical, alert, emergency) are present for basic filtering
60
+ purposes, but for sorting and other use cases that would require
61
+ flexibility, you should add Processors to the Logger that can add extra
62
+ information (tags, user ip, ..) to the records before they are handled.
63
+
64
+ Log Levels
65
+ ----------
66
+
67
+ Monolog supports all 8 logging levels defined in
68
+ [RFC 5424](http://tools.ietf.org/html/rfc5424), but unless you specifically
69
+ need syslog compatibility, it is advised to only use DEBUG, INFO, WARNING,
70
+ ERROR, CRITICAL, ALERT.
71
+
72
+ - **DEBUG** (100): Detailed debug information.
73
+
74
+ - **INFO** (200): Interesting events. Examples: User logs in, SQL logs.
75
+
76
+ - NOTICE (250): Normal but significant events.
77
+
78
+ - **WARNING** (300): Exceptional occurrences that are not errors. Examples:
79
+ Use of deprecated APIs, poor use of an API, undesirable things that are not
80
+ necessarily wrong.
81
+
82
+ - **ERROR** (400): Runtime errors that do not require immediate action but
83
+ should typically be logged and monitored.
84
+
85
+ - **CRITICAL** (500): Critical conditions. Example: Application component
86
+ unavailable, unexpected exception.
87
+
88
+ - **ALERT** (550): Action must be taken immediately. Example: Entire website
89
+ down, database unavailable, etc. This should trigger the SMS alerts and wake
90
+ you up.
91
+
92
+ - EMERGENCY (600): Emergency: system is unusable.
93
+
94
+ Docs
95
+ ====
96
+
97
+ **See the `doc` directory for more detailed documentation.
98
+ The following is only a list of all parts that come with Monolog.**
99
+
100
+ Handlers
101
+ --------
102
+
103
+ ### Log to files and syslog
104
+
105
+ - _StreamHandler_: Logs records into any PHP stream, use this for log files.
106
+ - _RotatingFileHandler_: Logs records to a file and creates one logfile per day.
107
+ It will also delete files older than `$maxFiles`. You should use
108
+ [logrotate](http://linuxcommand.org/man_pages/logrotate8.html) for high profile
109
+ setups though, this is just meant as a quick and dirty solution.
110
+ - _SyslogHandler_: Logs records to the syslog.
111
+
112
+ ### Send alerts and emails
113
+
114
+ - _NativeMailHandler_: Sends emails using PHP's
115
+ [`mail()`](http://php.net/manual/en/function.mail.php) function.
116
+ - _SwiftMailerHandler_: Sends emails using a [`Swift_Mailer`](http://swiftmailer.org/) instance.
117
+ - _PushoverHandler_: Sends mobile notifications via the [Pushover](https://www.pushover.net/) API.
118
+
119
+ ### Log specific servers and networked logging
120
+
121
+ - _SocketHandler_: Logs records to [sockets](http://php.net/fsockopen), use this
122
+ for UNIX and TCP sockets. See an [example](https://github.com/Seldaek/monolog/blob/master/doc/sockets.md).
123
+ - _AmqpHandler_: Logs records to an [amqp](http://www.amqp.org/) compatible
124
+ server. Requires the [php-amqp](http://pecl.php.net/package/amqp) extension (1.0+).
125
+ - _GelfHandler_: Logs records to a [Graylog2](http://www.graylog2.org) server.
126
+ - _CubeHandler_: Logs records to a [Cube](http://square.github.com/cube/) server.
127
+ - _RavenHandler_: Logs records to a [Sentry](http://getsentry.com/) server using
128
+ [raven](https://packagist.org/packages/raven/raven).
129
+ - _ZendMonitorHandler_: Logs records to the Zend Monitor present in Zend Server.
130
+
131
+ ### Logging in development
132
+
133
+ - _FirePHPHandler_: Handler for [FirePHP](http://www.firephp.org/), providing
134
+ inline `console` messages within [FireBug](http://getfirebug.com/).
135
+ - _ChromePHPHandler_: Handler for [ChromePHP](http://www.chromephp.com/), providing
136
+ inline `console` messages within Chrome.
137
+
138
+ ### Log to databases
139
+
140
+ - _RedisHandler_: Logs records to a [redis](http://redis.io) server.
141
+ - _MongoDBHandler_: Handler to write records in MongoDB via a
142
+ [Mongo](http://pecl.php.net/package/mongo) extension connection.
143
+ - _CouchDBHandler_: Logs records to a CouchDB server.
144
+ - _DoctrineCouchDBHandler_: Logs records to a CouchDB server via the Doctrine CouchDB ODM.
145
+
146
+ ### Wrappers / Special Handlers
147
+
148
+ - _FingersCrossedHandler_: A very interesting wrapper. It takes a logger as
149
+ parameter and will accumulate log records of all levels until a record
150
+ exceeds the defined severity level. At which point it delivers all records,
151
+ including those of lower severity, to the handler it wraps. This means that
152
+ until an error actually happens you will not see anything in your logs, but
153
+ when it happens you will have the full information, including debug and info
154
+ records. This provides you with all the information you need, but only when
155
+ you need it.
156
+ - _NullHandler_: Any record it can handle will be thrown away. This can be used
157
+ to put on top of an existing handler stack to disable it temporarily.
158
+ - _BufferHandler_: This handler will buffer all the log records it receives
159
+ until `close()` is called at which point it will call `handleBatch()` on the
160
+ handler it wraps with all the log messages at once. This is very useful to
161
+ send an email with all records at once for example instead of having one mail
162
+ for every log record.
163
+ - _GroupHandler_: This handler groups other handlers. Every record received is
164
+ sent to all the handlers it is configured with.
165
+ - _TestHandler_: Used for testing, it records everything that is sent to it and
166
+ has accessors to read out the information.
167
+
168
+ Formatters
169
+ ----------
170
+
171
+ - _LineFormatter_: Formats a log record into a one-line string.
172
+ - _NormalizerFormatter_: Normalizes objects/resources down to strings so a record can easily be serialized/encoded.
173
+ - _JsonFormatter_: Encodes a log record into json.
174
+ - _WildfireFormatter_: Used to format log records into the Wildfire/FirePHP protocol, only useful for the FirePHPHandler.
175
+ - _ChromePHPFormatter_: Used to format log records into the ChromePHP format, only useful for the ChromePHPHandler.
176
+ - _GelfFormatter_: Used to format log records into Gelf message instances, only useful for the GelfHandler.
177
+ - _LogstashFormatter_: Used to format log records into [logstash](http://logstash.net/) event json, useful for any handler listed under inputs [here](http://logstash.net/docs/1.1.5/).
178
+
179
+ Processors
180
+ ----------
181
+
182
+ - _IntrospectionProcessor_: Adds the line/file/class/method from which the log call originated.
183
+ - _WebProcessor_: Adds the current request URI, request method and client IP to a log record.
184
+ - _MemoryUsageProcessor_: Adds the current memory usage to a log record.
185
+ - _MemoryPeakUsageProcessor_: Adds the peak memory usage to a log record.
186
+ - _ProcessIdProcessor_: Adds the process id to a log record.
187
+ - _UidProcessor_: Adds a unique identifier to a log record.
188
+
189
+ About
190
+ =====
191
+
192
+ Requirements
193
+ ------------
194
+
195
+ - Any flavor of PHP 5.3 or above should do
196
+ - [optional] PHPUnit 3.5+ to execute the test suite (phpunit --version)
197
+
198
+ Submitting bugs and feature requests
199
+ ------------------------------------
200
+
201
+ Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues)
202
+
203
+ Frameworks Integration
204
+ ----------------------
205
+
206
+ - Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
207
+ can be used very easily with Monolog since it implements the interface.
208
+ - [Symfony2](http://symfony.com) comes out of the box with Monolog.
209
+ - [Silex](http://silex.sensiolabs.org/) comes out of the box with Monolog.
210
+ - [Laravel4](http://laravel.com/) comes out of the box with Monolog.
211
+ - [PPI](http://www.ppi.io/) comes out of the box with Monolog.
212
+ - [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin.
213
+ - [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer.
214
+
215
+ Author
216
+ ------
217
+
218
+ Jordi Boggiano - <j.boggiano@seld.be> - <http://twitter.com/seldaek><br />
219
+ See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) which participated in this project.
220
+
221
+ License
222
+ -------
223
+
224
+ Monolog is licensed under the MIT License - see the `LICENSE` file for details
225
+
226
+ Acknowledgements
227
+ ----------------
228
+
229
+ This library is heavily inspired by Python's [Logbook](http://packages.python.org/Logbook/)
230
+ library, although most concepts have been adjusted to fit to the PHP world.
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/composer.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "monolog/monolog",
3
+ "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
4
+ "keywords": ["log", "logging", "psr-3"],
5
+ "homepage": "http://github.com/Seldaek/monolog",
6
+ "type": "library",
7
+ "license": "MIT",
8
+ "authors": [
9
+ {
10
+ "name": "Jordi Boggiano",
11
+ "email": "j.boggiano@seld.be",
12
+ "homepage": "http://seld.be"
13
+ }
14
+ ],
15
+ "require": {
16
+ "php": ">=5.3.0",
17
+ "psr/log": "~1.0"
18
+ },
19
+ "require-dev": {
20
+ "mlehner/gelf-php": "1.0.*",
21
+ "raven/raven": "0.3.*",
22
+ "doctrine/couchdb": "dev-master"
23
+ },
24
+ "suggest": {
25
+ "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server",
26
+ "raven/raven": "Allow sending log messages to a Sentry server",
27
+ "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
28
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
29
+ "ext-mongo": "Allow sending log messages to a MongoDB server"
30
+ },
31
+ "autoload": {
32
+ "psr-0": {"Monolog": "src/"}
33
+ },
34
+ "extra": {
35
+ "branch-alias": {
36
+ "dev-master": "1.4.x-dev"
37
+ }
38
+ }
39
+ }
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/doc/extending.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Extending Monolog
2
+ =================
3
+
4
+ Monolog is fully extensible, allowing you to adapt your logger to your needs.
5
+
6
+ Writing your own handler
7
+ ------------------------
8
+
9
+ Monolog provides many built-in handlers. But if the one you need does not
10
+ exist, you can write it and use it in your logger. The only requirement is
11
+ to implement `Monolog\Handler\HandlerInterface`.
12
+
13
+ Let's write a PDOHandler to log records to a database. We will extend the
14
+ abstract class provided by Monolog to keep things DRY.
15
+
16
+ ```php
17
+ <?php
18
+
19
+ use Monolog\Logger;
20
+ use Monolog\Handler\AbstractProcessingHandler;
21
+
22
+ class PDOHandler extends AbstractProcessingHandler
23
+ {
24
+ private $initialized = false;
25
+ private $pdo;
26
+ private $statement;
27
+
28
+ public function __construct(PDO $pdo, $level = Logger::DEBUG, $bubble = true)
29
+ {
30
+ $this->pdo = $pdo;
31
+ parent::__construct($level, $bubble);
32
+ }
33
+
34
+ protected function write(array $record)
35
+ {
36
+ if (!$this->initialized) {
37
+ $this->initialize();
38
+ }
39
+
40
+ $this->statement->execute(array(
41
+ 'channel' => $record['channel'],
42
+ 'level' => $record['level'],
43
+ 'message' => $record['formatted'],
44
+ 'time' => $record['datetime']->format('U'),
45
+ ));
46
+ }
47
+
48
+ private function initialize()
49
+ {
50
+ $this->pdo->exec(
51
+ 'CREATE TABLE IF NOT EXISTS monolog '
52
+ .'(channel VARCHAR(255), level INTEGER, message LONGTEXT, time INTEGER UNSIGNED)'
53
+ );
54
+ $this->statement = $this->pdo->prepare(
55
+ 'INSERT INTO monolog (channel, level, message, time) VALUES (:channel, :level, :message, :time)'
56
+ );
57
+
58
+ $this->initialized = true;
59
+ }
60
+ }
61
+ ```
62
+
63
+ You can now use this handler in your logger:
64
+
65
+ ```php
66
+ <?php
67
+
68
+ $logger->pushHandler(new PDOHandler(new PDO('sqlite:logs.sqlite'));
69
+
70
+ // You can now use your logger
71
+ $logger->addInfo('My logger is now ready');
72
+ ```
73
+
74
+ The `Monolog\Handler\AbstractProcessingHandler` class provides most of the
75
+ logic needed for the handler, including the use of processors and the formatting
76
+ of the record (which is why we use ``$record['formatted']`` instead of ``$record['message']``).
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/doc/sockets.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Sockets Handler
2
+ ===============
3
+
4
+ This handler allows you to write your logs to sockets using [fsockopen](http://php.net/fsockopen)
5
+ or [pfsockopen](http://php.net/pfsockopen).
6
+
7
+ Persistent sockets are mainly useful in web environments where you gain some performance not closing/opening
8
+ the connections between requests.
9
+
10
+ Basic Example
11
+ -------------
12
+
13
+ ```php
14
+ <?php
15
+
16
+ use Monolog\Logger;
17
+ use Monolog\Handler\SocketHandler;
18
+
19
+ // Create the logger
20
+ $logger = new Logger('my_logger');
21
+
22
+ // Create the handler
23
+ $handler = new SocketHandler('unix:///var/log/httpd_app_log.socket');
24
+ $handler->setPersistent(true);
25
+
26
+ // Now add the handler
27
+ $logger->pushHandler($handler, Logger::DEBUG);
28
+
29
+ // You can now use your logger
30
+ $logger->addInfo('My logger is now ready');
31
+
32
+ ```
33
+
34
+ In this example, using syslog-ng, you should see the log on the log server:
35
+
36
+ cweb1 [2012-02-26 00:12:03] my_logger.INFO: My logger is now ready [] []
37
+
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/doc/usage.md ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Using Monolog
2
+ =============
3
+
4
+ Installation
5
+ ------------
6
+
7
+ Monolog is available on Packagist ([monolog/monolog](http://packagist.org/packages/monolog/monolog))
8
+ and as such installable via [Composer](http://getcomposer.org/).
9
+
10
+ If you do not use Composer, you can grab the code from GitHub, and use any
11
+ PSR-0 compatible autoloader (e.g. the [Symfony2 ClassLoader component](https://github.com/symfony/ClassLoader))
12
+ to load Monolog classes.
13
+
14
+ Configuring a logger
15
+ --------------------
16
+
17
+ Here is a basic setup to log to a file and to firephp on the DEBUG level:
18
+
19
+ ```php
20
+ <?php
21
+
22
+ use Monolog\Logger;
23
+ use Monolog\Handler\StreamHandler;
24
+ use Monolog\Handler\FirePHPHandler;
25
+
26
+ // Create the logger
27
+ $logger = new Logger('my_logger');
28
+ // Now add some handlers
29
+ $logger->pushHandler(new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG));
30
+ $logger->pushHandler(new FirePHPHandler());
31
+
32
+ // You can now use your logger
33
+ $logger->addInfo('My logger is now ready');
34
+ ```
35
+
36
+ Let's explain it. The first step is to create the logger instance which will
37
+ be used in your code. The argument is a channel name, which is useful when
38
+ you use several loggers (see below for more details about it).
39
+
40
+ The logger itself does not know how to handle a record. It delegates it to
41
+ some handlers. The code above registers two handlers in the stack to allow
42
+ handling records in two different ways.
43
+
44
+ Note that the FirePHPHandler is called first as it is added on top of the
45
+ stack. This allows you to temporarily add a logger with bubbling disabled if
46
+ you want to override other configured loggers.
47
+
48
+ Adding extra data in the records
49
+ --------------------------------
50
+
51
+ Monolog provides two different ways to add extra informations along the simple
52
+ textual message.
53
+
54
+ ### Using the logging context
55
+
56
+ The first way is the context, allowing to pass an array of data along the
57
+ record:
58
+
59
+ ```php
60
+ <?php
61
+
62
+ $logger->addInfo('Adding a new user', array('username' => 'Seldaek'));
63
+ ```
64
+
65
+ Simple handlers (like the StreamHandler for instance) will simply format
66
+ the array to a string but richer handlers can take advantage of the context
67
+ (FirePHP is able to display arrays in pretty way for instance).
68
+
69
+ ### Using processors
70
+
71
+ The second way is to add extra data for all records by using a processor.
72
+ Processors can be any callable. They will get the record as parameter and
73
+ must return it after having eventually changed the `extra` part of it. Let's
74
+ write a processor adding some dummy data in the record:
75
+
76
+ ```php
77
+ <?php
78
+
79
+ $logger->pushProcessor(function ($record) {
80
+ $record['extra']['dummy'] = 'Hello world!';
81
+
82
+ return $record;
83
+ });
84
+ ```
85
+
86
+ Monolog provides some built-in processors that can be used in your project.
87
+ Look at the README file for the list.
88
+
89
+ > Tip: processors can also be registered on a specific handler instead of
90
+ the logger to apply only for this handler.
91
+
92
+ Leveraging channels
93
+ -------------------
94
+
95
+ Channels are a great way to identify to which part of the application a record
96
+ is related. This is useful in big applications (and is leveraged by
97
+ MonologBundle in Symfony2).
98
+
99
+ Picture two loggers sharing a handler that writes to a single log file.
100
+ Channels would allow you to identify the logger that issued every record.
101
+ You can easily grep through the log files filtering this or that channel.
102
+
103
+ ```php
104
+ <?php
105
+
106
+ use Monolog\Logger;
107
+ use Monolog\Handler\StreamHandler;
108
+ use Monolog\Handler\FirePHPHandler;
109
+
110
+ // Create some handlers
111
+ $stream = new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG);
112
+ $firephp = new FirePHPHandler();
113
+
114
+ // Create the main logger of the app
115
+ $logger = new Logger('my_logger');
116
+ $logger->pushHandler($stream);
117
+ $logger->pushHandler($firephp);
118
+
119
+ // Create a logger for the security-related stuff with a different channel
120
+ $securityLogger = new Logger('security');
121
+ $securityLogger->pushHandler($stream);
122
+ $securityLogger->pushHandler($firephp);
123
+ ```
124
+
125
+ Customizing log format
126
+ ----------------------
127
+
128
+ In Monolog it's easy to customize the format of the logs written into files,
129
+ sockets, mails, databases and other handlers. Most of the handlers use the
130
+
131
+ ```php
132
+ $record['formatted']
133
+ ```
134
+
135
+ value to be automatically put into the log device. This value depends on the
136
+ formatter settings. You can choose between predefined formatter classes or
137
+ write your own (e.g. a multiline text file for human-readable output).
138
+
139
+ To configure a predefined formatter class, just set it as the handler's field:
140
+
141
+ ```php
142
+ // the default date format is "Y-m-d H:i:s"
143
+ $dateFormat = "Y n j, g:i a";
144
+ // the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"
145
+ $output = "%datetime% > %level_name% > %message% %context% %extra%\n";
146
+ // finally, create a formatter
147
+ $formatter = new LineFormatter($output, $dateFormat);
148
+
149
+ // Create a handler
150
+ $stream = new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG);
151
+ $stream->setFormatter($formatter);
152
+ // bind it to a logger object
153
+ $securityLogger = new Logger('security');
154
+ $securityLogger->pushHandler($stream);
155
+ ```
156
+
157
+ You may also reuse the same formatter between multiple handlers and share those
158
+ handlers between multiple loggers.
benchmark/NYU_CTF_Bench/development/2013/CSAW-Finals/web/historypeats/csaw/fuel/vendor/monolog/monolog/phpunit.xml.dist ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <phpunit bootstrap="tests/bootstrap.php" colors="true">
4
+ <testsuites>
5
+ <testsuite name="Monolog Test Suite">
6
+ <directory>tests/Monolog/</directory>
7
+ </testsuite>
8
+ </testsuites>
9
+
10
+ <filter>
11
+ <whitelist>
12
+ <directory suffix=".php">src/Monolog/</directory>
13
+ </whitelist>
14
+ </filter>
15
+ </phpunit>