Lines Matching refs:file
568 # Now remove the file.
571 # The next call should recreate the file.
1214 """Reading logging config from a .ini-style config file."""
1431 keys=file
1438 handlers=file
1469 file = io.StringIO(textwrap.dedent(conf))
1470 logging.config.fileConfig(file, encoding="utf-8", **kwargs)
1473 # A simple config file which overrides the default settings.
1488 # A simple config file which overrides the default settings.
1490 file = io.StringIO(textwrap.dedent(self.config0))
1492 cp.read_file(file)
1506 # A config file defining a sub-parser as well.
1521 # A simple config file which overrides the default settings.
1525 # A simple config file which overrides the default settings.
1529 # A config file specifying a custom formatter class.
1672 file = io.StringIO(textwrap.dedent(test_config))
1673 self.assertRaises(RuntimeError, logging.config.fileConfig, file)
1823 # just need a name - file can't be present, or we'll get an
2172 # In Python 2.x, a plain file object is treated as having no encoding.
2236 # See if an explicit file uses the original implementation
3272 "file": {
3279 "handlers": ["file"]
4495 # function to be able to open or reopen the file during Python
4508 # basicConfig() opens the file, but logging.shutdown() closes
4510 # FileHandler._open() must be called again to re-open the file.
5129 lambda f, file: called.append(file.getvalue()))
5326 "Assert a log file is there and register it for deletion"
5328 msg="Log file %r does not exist" % filename)
5365 # bpo-45401 - test with special file
5379 # checks that the file is created and assumes it was created
5472 r = logging.makeLogRecord({'msg': 'testing - device file'})
5489 # At this point, we should have a recent rotated file which we
5492 # in time to go to look for the log file. So, we go back a fair
5493 # bit, and stop as soon as we see a rotated file. In theory this
5510 print('Test time: %s' % now.strftime("%Y-%m-%d %H-%M-%S"), file=sys.stderr)
5511 print('The only matching files are: %s' % files, file=sys.stderr)
5667 print('t: %s (%s)' % (t, rh.utc), file=sys.stderr)
5668 print('currentHour: %s' % currentHour, file=sys.stderr)
5669 print('currentMinute: %s' % currentMinute, file=sys.stderr)
5670 print('currentSecond: %s' % currentSecond, file=sys.stderr)
5671 print('r: %s' % r, file=sys.stderr)
5672 print('result: %s' % result, file=sys.stderr)
5674 print('exception in diagnostic code: %s' % e, file=sys.stderr)