Skip to content

Commit ed87706

Browse files
committed
change default logging level to debug
1 parent 8ffa614 commit ed87706

File tree

3 files changed

+51
-84
lines changed

3 files changed

+51
-84
lines changed

docs/logger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ process:
5050
```
5151

5252
The other Logger fields have, in this case, the default values:
53-
`Level -> Warning`, `show_level -> false`, `show_log_origin -> false`. For
53+
`Level -> Debug`, `show_level -> false`, `show_log_origin -> false`. For
5454
configuring these too, you can also pass the following optional parameters:
5555
`--level <log_level>`, `--show-level`, `--show-log-origin`:
5656

src/firecracker/swagger/firecracker.yaml

Lines changed: 49 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ paths:
8585
Will fail if update is not possible.
8686
operationId: putBalloon
8787
parameters:
88-
- name: body
89-
in: body
90-
description: Balloon properties
91-
required: true
92-
schema:
93-
$ref: "#/definitions/Balloon"
88+
- name: body
89+
in: body
90+
description: Balloon properties
91+
required: true
92+
schema:
93+
$ref: "#/definitions/Balloon"
9494
responses:
9595
204:
9696
description: Balloon device created/updated
@@ -109,12 +109,12 @@ paths:
109109
Will fail if update is not possible.
110110
operationId: patchBalloon
111111
parameters:
112-
- name: body
113-
in: body
114-
description: Balloon properties
115-
required: true
116-
schema:
117-
$ref: "#/definitions/BalloonUpdate"
112+
- name: body
113+
in: body
114+
description: Balloon properties
115+
required: true
116+
schema:
117+
$ref: "#/definitions/BalloonUpdate"
118118
responses:
119119
204:
120120
description: Balloon device updated
@@ -151,12 +151,12 @@ paths:
151151
Will fail if update is not possible.
152152
operationId: patchBalloonStatsInterval
153153
parameters:
154-
- name: body
155-
in: body
156-
description: Balloon properties
157-
required: true
158-
schema:
159-
$ref: "#/definitions/BalloonStatsUpdate"
154+
- name: body
155+
in: body
156+
description: Balloon properties
157+
required: true
158+
schema:
159+
$ref: "#/definitions/BalloonStatsUpdate"
160160
responses:
161161
204:
162162
description: Balloon statistics interval updated
@@ -220,7 +220,6 @@ paths:
220220
schema:
221221
$ref: "#/definitions/Error"
222222

223-
224223
/drives/{drive_id}:
225224
put:
226225
summary: Creates or updates a drive. Pre-boot only.
@@ -488,8 +487,7 @@ paths:
488487
/entropy:
489488
put:
490489
summary: Creates an entropy device. Pre-boot only.
491-
description:
492-
Enables an entropy device that provides high-quality random data to the guest.
490+
description: Enables an entropy device that provides high-quality random data to the guest.
493491
operationId: putEntropyDevice
494492
parameters:
495493
- name: body
@@ -506,12 +504,10 @@ paths:
506504
schema:
507505
$ref: "#/definitions/Error"
508506

509-
510507
/network-interfaces/{iface_id}:
511508
put:
512509
summary: Creates a network interface. Pre-boot only.
513-
description:
514-
Creates new network interface with ID specified by iface_id path parameter.
510+
description: Creates new network interface with ID specified by iface_id path parameter.
515511
operationId: putGuestNetworkInterfaceByID
516512
parameters:
517513
- name: iface_id
@@ -538,8 +534,7 @@ paths:
538534
$ref: "#/definitions/Error"
539535
patch:
540536
summary: Updates the rate limiters applied to a network interface. Post-boot only.
541-
description:
542-
Updates the rate limiters applied to a network interface.
537+
description: Updates the rate limiters applied to a network interface.
543538
operationId: patchGuestNetworkInterfaceByID
544539
parameters:
545540
- name: iface_id
@@ -594,8 +589,7 @@ paths:
594589
/snapshot/load:
595590
put:
596591
summary: Loads a snapshot. Pre-boot only.
597-
description:
598-
Loads the microVM state from a snapshot.
592+
description: Loads the microVM state from a snapshot.
599593
Only accepted on a fresh Firecracker process (before configuring
600594
any resource other than the Logger and Metrics).
601595
operationId: loadSnapshot
@@ -635,8 +629,7 @@ paths:
635629
/vm:
636630
patch:
637631
summary: Updates the microVM state.
638-
description:
639-
Sets the desired state (Paused or Resumed) for the microVM.
632+
description: Sets the desired state (Paused or Resumed) for the microVM.
640633
operationId: patchVm
641634
parameters:
642635
- name: body
@@ -707,8 +700,7 @@ definitions:
707700
required:
708701
- amount_mib
709702
- deflate_on_oom
710-
description:
711-
Balloon device descriptor.
703+
description: Balloon device descriptor.
712704
properties:
713705
amount_mib:
714706
type: integer
@@ -724,17 +716,15 @@ definitions:
724716
type: object
725717
required:
726718
- amount_mib
727-
description:
728-
Balloon device descriptor.
719+
description: Balloon device descriptor.
729720
properties:
730721
amount_mib:
731722
type: integer
732723
description: Target balloon size in MiB.
733724

734725
BalloonStats:
735726
type: object
736-
description:
737-
Describes the balloon device statistics.
727+
description: Describes the balloon device statistics.
738728
required:
739729
- target_pages
740730
- actual_pages
@@ -798,8 +788,7 @@ definitions:
798788
type: object
799789
required:
800790
- stats_polling_interval_s
801-
description:
802-
Update the statistics polling interval, with the first statistics update scheduled immediately. Statistics cannot be turned on/off after boot.
791+
description: Update the statistics polling interval, with the first statistics update scheduled immediately. Statistics cannot be turned on/off after boot.
803792
properties:
804793
stats_polling_interval_s:
805794
type: integer
@@ -809,8 +798,7 @@ definitions:
809798
type: object
810799
required:
811800
- kernel_image_path
812-
description:
813-
Boot source descriptor.
801+
description: Boot source descriptor.
814802
properties:
815803
boot_args:
816804
type: string
@@ -879,21 +867,18 @@ definitions:
879867
type: boolean
880868
cache_type:
881869
type: string
882-
description:
883-
Represents the caching strategy for the block device.
870+
description: Represents the caching strategy for the block device.
884871
enum: ["Unsafe", "Writeback"]
885872
default: "Unsafe"
886873

887874
# VirtioBlock specific parameters
888875
is_read_only:
889876
type: boolean
890-
description:
891-
Is block read only.
877+
description: Is block read only.
892878
This field is required for virtio-block config and should be omitted for vhost-user-block configuration.
893879
path_on_host:
894880
type: string
895-
description:
896-
Host level path for the guest drive.
881+
description: Host level path for the guest drive.
897882
This field is required for virtio-block config and should be omitted for vhost-user-block configuration.
898883
rate_limiter:
899884
$ref: "#/definitions/RateLimiter"
@@ -909,8 +894,7 @@ definitions:
909894
# VhostUserBlock specific parameters
910895
socket:
911896
type: string
912-
description:
913-
Path to the socket of vhost-user-block backend.
897+
description: Path to the socket of vhost-user-block backend.
914898
This field is required for vhost-user-block config should be omitted for virtio-block configuration.
915899

916900
Error:
@@ -955,8 +939,7 @@ definitions:
955939

956940
InstanceActionInfo:
957941
type: object
958-
description:
959-
Variant wrapper containing the real action.
942+
description: Variant wrapper containing the real action.
960943
required:
961944
- action_type
962945
properties:
@@ -970,8 +953,7 @@ definitions:
970953

971954
InstanceInfo:
972955
type: object
973-
description:
974-
Describes MicroVM instance information.
956+
description: Describes MicroVM instance information.
975957
required:
976958
- app_name
977959
- id
@@ -999,14 +981,13 @@ definitions:
999981

1000982
Logger:
1001983
type: object
1002-
description:
1003-
Describes the configuration option for the logging capability.
984+
description: Describes the configuration option for the logging capability.
1004985
properties:
1005986
level:
1006987
type: string
1007988
description: Set the level. The possible values are case-insensitive.
1008989
enum: [Error, Warning, Info, Debug, Trace, Off]
1009-
default: Info
990+
default: Debug
1010991
log_path:
1011992
type: string
1012993
description: Path to the named pipe or file for the human readable log output.
@@ -1085,8 +1066,7 @@ definitions:
10851066

10861067
Metrics:
10871068
type: object
1088-
description:
1089-
Describes the configuration option for the metrics capability.
1069+
description: Describes the configuration option for the metrics capability.
10901070
required:
10911071
- metrics_path
10921072
properties:
@@ -1096,8 +1076,7 @@ definitions:
10961076

10971077
MmdsConfig:
10981078
type: object
1099-
description:
1100-
Defines the MMDS configuration.
1079+
description: Defines the MMDS configuration.
11011080
required:
11021081
- network_interfaces
11031082
properties:
@@ -1134,13 +1113,11 @@ definitions:
11341113

11351114
MmdsContentsObject:
11361115
type: object
1137-
description:
1138-
Describes the contents of MMDS in JSON format.
1116+
description: Describes the contents of MMDS in JSON format.
11391117

11401118
NetworkInterface:
11411119
type: object
1142-
description:
1143-
Defines a network interface.
1120+
description: Defines a network interface.
11441121
required:
11451122
- host_dev_name
11461123
- iface_id
@@ -1166,8 +1143,7 @@ definitions:
11661143
type: string
11671144
path_on_host:
11681145
type: string
1169-
description:
1170-
Host level path for the guest drive.
1146+
description: Host level path for the guest drive.
11711147
This field is optional for virtio-block config and should be omitted for vhost-user-block configuration.
11721148
rate_limiter:
11731149
$ref: "#/definitions/RateLimiter"
@@ -1233,12 +1209,10 @@ definitions:
12331209
properties:
12341210
iface_id:
12351211
type: string
1236-
description:
1237-
The name of the interface to modify
1212+
description: The name of the interface to modify
12381213
host_dev_name:
12391214
type: string
1240-
description:
1241-
The new host device of the interface
1215+
description: The new host device of the interface
12421216

12431217
SnapshotLoadParams:
12441218
type: object
@@ -1250,12 +1224,10 @@ definitions:
12501224
properties:
12511225
enable_diff_snapshots:
12521226
type: boolean
1253-
description:
1254-
(Deprecated) Enable dirty page tracking to improve space efficiency of diff snapshots
1227+
description: (Deprecated) Enable dirty page tracking to improve space efficiency of diff snapshots
12551228
track_dirty_pages:
12561229
type: boolean
1257-
description:
1258-
Enable dirty page tracking to improve space efficiency of diff snapshots
1230+
description: Enable dirty page tracking to improve space efficiency of diff snapshots
12591231
mem_file_path:
12601232
type: string
12611233
description:
@@ -1273,15 +1245,13 @@ definitions:
12731245
description: Path to the file that contains the microVM state to be loaded.
12741246
resume_vm:
12751247
type: boolean
1276-
description:
1277-
When set to true, the vm is also resumed if the snapshot load is successful.
1248+
description: When set to true, the vm is also resumed if the snapshot load is successful.
12781249
network_overrides:
12791250
type: array
12801251
description: Network host device names to override
12811252
items:
12821253
$ref: "#/definitions/NetworkOverride"
12831254

1284-
12851255
TokenBucket:
12861256
type: object
12871257
description:
@@ -1315,8 +1285,7 @@ definitions:
13151285

13161286
Vm:
13171287
type: object
1318-
description:
1319-
Defines the microVM running state. It is especially useful in the snapshotting context.
1288+
description: Defines the microVM running state. It is especially useful in the snapshotting context.
13201289
required:
13211290
- state
13221291
properties:
@@ -1328,16 +1297,14 @@ definitions:
13281297

13291298
EntropyDevice:
13301299
type: object
1331-
description:
1332-
Defines an entropy device.
1300+
description: Defines an entropy device.
13331301
properties:
13341302
rate_limiter:
13351303
$ref: "#/definitions/RateLimiter"
13361304

13371305
FirecrackerVersion:
13381306
type: object
1339-
description:
1340-
Describes the Firecracker version.
1307+
description: Describes the Firecracker version.
13411308
required:
13421309
- firecracker_version
13431310
properties:

src/vmm/src/logger/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use super::metrics::{IncMetric, METRICS};
1717

1818
/// Default level filter for logger matching the swagger specification
1919
/// (`src/firecracker/swagger/firecracker.yaml`).
20-
pub const DEFAULT_LEVEL: log::LevelFilter = log::LevelFilter::Info;
20+
pub const DEFAULT_LEVEL: log::LevelFilter = log::LevelFilter::Debug;
2121
/// Default instance id.
2222
pub const DEFAULT_INSTANCE_ID: &str = "anonymous-instance";
2323
/// Instance id.

0 commit comments

Comments
 (0)