~ubuntu-branches/debian/sid/netatalk/sid

« back to all changes in this revision

Viewing changes to libatalk/util/test/logger_test.c

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2010-11-28 13:26:40 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20101128132640-c35vd1i39kc5ul78
Tags: 2.1.4-1
* New upstream release.
* Add NEWS entry on BerkeleyDB bump to 4.8 and databases now auto-
  upgrading (replacing older testing-only entry bumping to 4.7).
  Rephrase README.Debian to mention auto-upgrading.
* Bump standards compliance to standards-version 3.9.0.
* Unfuzz patch 114.
* Update copyright file:
  + Fix document a few missed copyright holders (no new licenses).
  + Split comments in License fields into separate License-Comments
    fields.
* Ease building with git-buildpackage: Git-ignore quilt .pc dir, and
  add source local-options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
  unsetuplog("Default");
25
25
#endif
26
26
  /* filelog testing */
27
 
  setuplog("Default LOG_INFO test.log");
28
 
  LOG(log_info, logtype_logger, "This should log.");
29
 
  LOG(log_info, logtype_default, "This should log.");
30
 
  LOG(log_error, logtype_logger, "This should log.");
31
 
  LOG(log_error, logtype_default, "This should log.");
32
 
  LOG(log_debug, logtype_logger, "This should not log.");
33
 
  LOG(log_debug, logtype_default, "This should not log.");
34
 
 
35
 
  LOG(log_severe, logtype_logger, "Logging Test finishing");
 
27
 
 
28
  setuplog("DSI log_maxdebug test.log");
 
29
  LOG(log_info, logtype_dsi, "This should log.");
 
30
  LOG(log_error, logtype_default, "This should not log.");
 
31
 
 
32
  setuplog("Default log_debug test.log");
 
33
  LOG(log_debug, logtype_default, "This should log.");
 
34
  LOG(log_maxdebug, logtype_default, "This should not log.");
 
35
 
 
36
  LOG(log_maxdebug, logtype_dsi, "This should still log.");
 
37
 
 
38
  /* flooding prevention check */
 
39
  LOG(log_debug, logtype_default, "Flooding 3x");
 
40
  for (int i = 0; i < 3; i++) {
 
41
      LOG(log_debug, logtype_default, "Flooding...");
 
42
  }
 
43
  /* wipe the array */
 
44
  LOG(log_debug, logtype_default, "1"); LOG(log_debug, logtype_default, "2"); LOG(log_debug, logtype_default, "3");
 
45
 
 
46
  LOG(log_debug, logtype_default, "-============");
 
47
  LOG(log_debug, logtype_default, "Flooding 5x");
 
48
  for (int i = 0; i < 5; i++) {
 
49
      LOG(log_debug, logtype_default, "Flooding...");
 
50
  }
 
51
  LOG(log_debug, logtype_default, "1"); LOG(log_debug, logtype_default, "2"); LOG(log_debug, logtype_default, "3");
 
52
 
 
53
  LOG(log_debug, logtype_default, "o============");
 
54
  LOG(log_debug, logtype_default, "Flooding 2005x");
 
55
  for (int i = 0; i < 2005; i++) {
 
56
      LOG(log_debug, logtype_default, "Flooding...");
 
57
  }
 
58
  LOG(log_debug, logtype_default, "1"); LOG(log_debug, logtype_default, "2"); LOG(log_debug, logtype_default, "3");
 
59
 
 
60
  LOG(log_debug, logtype_default, "0============");
 
61
  LOG(log_debug, logtype_default, "Flooding 11x1");
 
62
  for (int i = 0; i < 11; i++) {
 
63
      LOG(log_error, logtype_default, "flooding 11x1 1");
 
64
  }
 
65
 
 
66
  LOG(log_debug, logtype_default, "1============");
 
67
  LOG(log_debug, logtype_default, "Flooding 11x2");
 
68
  for (int i = 0; i < 11; i++) {
 
69
      LOG(log_error, logtype_default, "flooding 11x2 1");
 
70
      LOG(log_error, logtype_default, "flooding 11x2 2");
 
71
  }
 
72
 
 
73
  LOG(log_debug, logtype_default, "2============");
 
74
  LOG(log_debug, logtype_default, "Flooding 11x3");
 
75
  for (int i = 0; i < 11; i++) {
 
76
      LOG(log_error, logtype_default, "flooding 11x3 1");
 
77
      LOG(log_error, logtype_default, "flooding 11x3 2");
 
78
      LOG(log_error, logtype_default, "flooding 11x3 3");
 
79
  }
 
80
 
 
81
  LOG(log_debug, logtype_default, "3============");
 
82
  LOG(log_debug, logtype_default, "Flooding 11x4");
 
83
  for (int i = 0; i < 11; i++) {
 
84
      LOG(log_error, logtype_default, "flooding 11x4 1");
 
85
      LOG(log_error, logtype_default, "flooding 11x4 2");
 
86
      LOG(log_error, logtype_default, "flooding 11x4 3");
 
87
      LOG(log_error, logtype_default, "flooding 11x4 4");
 
88
  }
 
89
 
36
90
 
37
91
  return 0;
38
92
}