Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
7159-snmp-Types-and-specs-for-snmp-set_trace-1....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 7159-snmp-Types-and-specs-for-snmp-set_trace-1.patch of Package erlang
From 5a31215bc59914bb6aa2d9d7c9b26d7cb28903f5 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Wed, 10 Jan 2024 18:42:06 +0100 Subject: [PATCH 19/67] [snmp] Types and specs for snmp:set_trace/1 --- lib/snmp/doc/src/snmp.xml | 19 ++++--------------- lib/snmp/src/app/snmp.erl | 8 ++++++++ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml index fbbef96343..1b6f1649ac 100644 --- a/lib/snmp/doc/src/snmp.xml +++ b/lib/snmp/doc/src/snmp.xml @@ -609,24 +609,13 @@ </func> <func> - <name since="">set_trace(Targets) -> void()</name> + <name name="set_trace" arity="1" clause_i="1" since=""/> <fsummary>Set trace target</fsummary> - <type> - <v>Targets = target() | targets()</v> - <v>target() = module()</v> - <v>module() = atom()</v> - <v>targets() = [target() | {target(), target_options()}]</v> - <v>target_options() = [target_option()]</v> - <v>target_option() = {return_trace, boolean()} | {scope, scope()}</v> - <v>scope() = all_functions | exported_functions | function_name() | {function_name(), function_arity()}</v> - <v>function_name() = atom()</v> - <v>function_arity() = integer() >= 0</v> - </type> <desc> <p>This function is used to set up default trace on function(s) - for the given module or modules. The scope of the trace will be - all <em>exported</em> functions (both the call info and the return - value). Timestamp info will also be included. </p> + for the given module or modules. The scope of the trace will be + all <em>exported</em> functions (both the call info and the return + value). Timestamp info will also be included. </p> <marker id="reset_trace"></marker> </desc> diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl index f9bd5a42b7..1a6a868c84 100644 --- a/lib/snmp/src/app/snmp.erl +++ b/lib/snmp/src/app/snmp.erl @@ -260,6 +260,14 @@ disable_trace() -> dbg:stop(). +-spec set_trace(Targets) -> void() when + Targets :: module() | [module() | {module(), [TargetOpt]}], + TargetOpt :: {return_trace, boolean()} | {scope, Scope}, + Scope :: all_functions | exported_functions | + FunctionName | {FunctionName, FunctionArity}, + FunctionName :: atom(), + FunctionArity :: non_neg_integer(). + set_trace(Module) when is_atom(Module) -> set_trace([Module]); set_trace(Modules) when is_list(Modules) -> -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor